home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 July / Macworld (1999-07).dmg / Shareware World / Info / For Developers / Mops 3.4.sea / Mops source / PPC source / cg1 < prev    next >
MacBinary  |  1999-01-14  |  36.3 KB  |  [TEXT/MSET]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Thu Jan 14 09:31:58 1999, modified Thu Jan 14 09:31:58 1999, creator 'MSET', type ASCII, 36586 bytes "cg1" , at 0x8f6a 381 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
0% TrID Sybase iAnywhere database files default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MSET]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 03 63 67 31 00 00 00 | 00 00 00 00 00 00 00 00 |..cg1...|........|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 53 45 | 54 01 00 00 00 00 00 00 |.TEXTMSE|T.......|
|00000050| 00 00 00 00 00 8e ea 00 | 00 01 7d b2 c3 b0 5e b2 |........|..}...^.|
|00000060| c3 b0 5e 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |..^.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 6e b1 00 00 |........|....n...|
|00000080| 6d 61 72 6b 65 72 20 6d | 5f 5f 63 67 31 0d 0d 0d |marker m|__cg1...|
|00000090| 5c 09 09 09 09 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |\....===|========|
|000000a0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000000b0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 0d 5c |========|======.\|
|000000c0| 09 09 09 09 09 09 50 4f | 57 45 52 50 43 20 43 4f |......PO|WERPC CO|
|000000d0| 44 45 20 47 45 4e 45 52 | 41 54 4f 52 0d 5c 09 09 |DE GENER|ATOR.\..|
|000000e0| 09 09 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |..======|========|
|000000f0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000100| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 0d 0d 0d 5c 20 |========|===...\ |
|00000110| 4e 4f 54 45 3a 20 20 61 | 6c 6c 20 74 68 65 20 74 |NOTE: a|ll the t|
|00000120| 65 63 68 6e 69 63 61 6c | 20 64 6f 63 75 6d 65 6e |echnical| documen|
|00000130| 74 61 74 69 6f 6e 20 69 | 73 20 61 74 20 74 68 65 |tation i|s at the|
|00000140| 20 65 6e 64 20 6f 66 20 | 74 68 69 73 20 66 69 6c | end of |this fil|
|00000150| 65 2c 20 0d 5c 20 20 61 | 66 74 65 72 20 74 68 65 |e, .\ a|fter the|
|00000160| 20 65 6e 64 6c 6f 61 64 | 2e 0d 0d 0d 0d 74 72 75 | endload|.....tru|
|00000170| 65 09 63 6f 6e 73 74 61 | 6e 74 09 61 73 73 65 72 |e.consta|nt.asser|
|00000180| 74 69 6f 6e 73 3f 09 0d | 09 09 09 5c 20 6d 61 6b |tions?..|...\ mak|
|00000190| 65 20 69 74 20 66 61 6c | 73 65 20 77 68 65 6e 20 |e it fal|se when |
|000001a0| 65 76 65 72 79 74 68 69 | 6e 67 20 72 65 61 6c 6c |everythi|ng reall|
|000001b0| 79 20 77 6f 72 6b 73 3f | 21 3f 0d 0d 50 50 43 3f |y works?|!?..PPC?|
|000001c0| 0d 5b 49 46 5d 0d 66 61 | 6c 73 65 09 63 6f 6e 73 |.[IF].fa|lse.cons|
|000001d0| 74 61 6e 74 09 64 65 62 | 75 67 3f 0d 5b 45 4c 53 |tant.deb|ug?.[ELS|
|000001e0| 45 5d 0d 66 61 6c 73 65 | 09 63 6f 6e 73 74 61 6e |E].false|.constan|
|000001f0| 74 09 64 65 62 75 67 3f | 0d 5b 54 48 45 4e 5d 0d |t.debug?|.[THEN].|
|00000200| 0d 66 61 6c 73 65 09 63 | 6f 6e 73 74 61 6e 74 09 |.false.c|onstant.|
|00000210| 36 34 62 69 74 3f 0d 0d | 0d 5c 09 09 3d 3d 3d 3d |64bit?..|.\..====|
|00000220| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 20 4f 50 54 49 |========|=== OPTI|
|00000230| 4d 49 5a 41 54 49 4f 4e | 20 46 4c 41 47 53 20 3d |MIZATION| FLAGS =|
|00000240| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 0d 0d |========|======..|
|00000250| 28 2a 09 69 74 27 73 20 | 75 73 65 66 75 6c 20 74 |(*.it's |useful t|
|00000260| 6f 20 62 65 20 61 62 6c | 65 20 74 6f 20 74 75 72 |o be abl|e to tur|
|00000270| 6e 20 74 68 65 73 65 20 | 6f 66 66 2c 20 74 6f 20 |n these |off, to |
|00000280| 66 69 6e 64 20 74 68 6f | 73 65 0d 09 72 65 63 61 |find tho|se..reca|
|00000290| 6c 63 69 74 72 61 6e 74 | 20 62 75 67 73 20 2d 20 |lcitrant| bugs - |
|000002a0| 61 6e 64 20 69 6e 20 74 | 68 65 20 63 61 73 65 20 |and in t|he case |
|000002b0| 6f 66 20 72 61 6e 67 65 | 20 63 68 65 63 6b 69 6e |of range| checkin|
|000002c0| 67 2c 0d 09 74 6f 20 62 | 65 20 61 62 6c 65 20 74 |g,..to b|e able t|
|000002d0| 6f 20 74 75 72 6e 20 69 | 74 20 6f 66 66 20 66 6f |o turn i|t off fo|
|000002e0| 72 20 73 70 65 65 64 2d | 63 72 69 74 69 63 61 6c |r speed-|critical|
|000002f0| 20 74 65 73 74 65 64 0d | 09 63 6f 64 65 2e 20 20 | tested.|.code. |
|00000300| 4f 72 20 66 6f 72 20 66 | 6c 6f 61 74 69 6e 67 20 |Or for f|loating |
|00000310| 6d 75 6c 74 69 70 6c 79 | 2d 61 64 64 2c 20 73 6f |multiply|-add, so|
|00000320| 6d 65 6f 6e 65 20 6d 69 | 67 68 74 20 77 61 6e 74 |meone mi|ght want|
|00000330| 20 74 6f 0d 09 74 75 72 | 6e 20 69 74 20 6f 66 66 | to..tur|n it off|
|00000340| 20 74 6f 20 72 65 73 74 | 6f 72 65 20 73 74 72 69 | to rest|ore stri|
|00000350| 63 74 20 49 45 45 45 20 | 46 50 20 73 65 6d 61 6e |ct IEEE |FP seman|
|00000360| 74 69 63 73 2e 0d 09 0d | 09 4e 4f 54 45 3a 20 74 |tics....|.NOTE: t|
|00000370| 68 65 20 64 65 66 61 75 | 6c 74 20 66 6f 72 20 61 |he defau|lt for a|
|00000380| 6c 6c 20 74 68 65 73 65 | 20 62 6f 6f 6c 65 61 6e |ll these| boolean|
|00000390| 20 76 61 6c 75 65 73 20 | 69 73 20 54 52 55 45 2e | values |is TRUE.|
|000003a0| 0d 0d 2a 29 0d 0d 74 72 | 75 65 09 76 61 6c 75 65 |..*)..tr|ue.value|
|000003b0| 09 09 68 6f 69 73 74 3f | 09 09 09 09 09 5c 20 63 |..hoist?|.....\ c|
|000003c0| 61 6e 20 77 65 20 6d 6f | 76 65 20 6f 70 73 20 6f |an we mo|ve ops o|
|000003d0| 75 74 20 6f 66 20 6c 6f | 6f 70 73 20 69 66 0d 09 |ut of lo|ops if..|
|000003e0| 09 09 09 09 09 09 09 09 | 09 09 5c 20 20 74 68 65 |........|..\ the|
|000003f0| 79 27 72 65 20 69 6e 76 | 61 72 69 61 6e 74 20 69 |y're inv|ariant i|
|00000400| 6e 20 74 68 65 20 6c 6f | 6f 70 3f 0d 0d 74 72 75 |n the lo|op?..tru|
|00000410| 65 09 76 61 6c 75 65 09 | 09 68 6f 69 73 74 5f 66 |e.value.|.hoist_f|
|00000420| 65 74 63 68 65 73 3f 09 | 09 09 5c 20 63 61 6e 20 |etches?.|..\ can |
|00000430| 77 65 20 6d 6f 76 65 20 | 66 65 74 63 68 65 73 20 |we move |fetches |
|00000440| 74 6f 20 61 73 20 65 61 | 72 6c 79 0d 09 09 09 09 |to as ea|rly.....|
|00000450| 09 09 09 09 09 09 09 5c | 20 20 61 73 20 70 6f 73 |.......\| as pos|
|00000460| 73 69 62 6c 65 3f 0d 0d | 74 72 75 65 09 76 61 6c |sible?..|true.val|
|00000470| 75 65 09 09 61 6c 6c 6f | 77 5f 6d 61 74 63 68 3f |ue..allo|w_match?|
|00000480| 09 09 09 5c 20 74 72 75 | 65 20 69 66 20 77 65 20 |...\ tru|e if we |
|00000490| 63 61 6e 20 65 6c 69 6d | 69 6e 61 74 65 20 61 6e |can elim|inate an|
|000004a0| 20 6f 70 20 69 66 0d 09 | 09 09 09 09 09 09 09 09 | op if..|........|
|000004b0| 09 09 5c 20 20 77 65 20 | 66 69 6e 64 20 74 68 65 |..\ we |find the|
|000004c0| 20 72 65 73 75 6c 74 20 | 61 6c 72 65 61 64 79 20 | result |already |
|000004d0| 69 6e 0d 09 09 09 09 09 | 09 09 09 09 09 09 5c 20 |in......|......\ |
|000004e0| 20 61 20 72 65 67 69 73 | 74 65 72 2e 20 20 42 61 | a regis|ter. Ba|
|000004f0| 73 69 63 61 6c 6c 79 20 | 74 68 65 20 73 61 6d 65 |sically |the same|
|00000500| 0d 09 09 09 09 09 09 09 | 09 09 09 09 5c 20 20 61 |........|....\ a|
|00000510| 73 20 43 53 45 20 28 63 | 6f 6d 6d 6f 6e 20 73 75 |s CSE (c|ommon su|
|00000520| 62 65 78 70 72 65 73 73 | 69 6f 6e 20 0d 09 09 09 |bexpress|ion ....|
|00000530| 09 09 09 09 09 09 09 09 | 5c 20 20 65 6c 69 6d 69 |........|\ elimi|
|00000540| 6e 61 74 69 6f 6e 29 2e | 0d 0d 74 72 75 65 09 76 |nation).|..true.v|
|00000550| 61 6c 75 65 09 09 6d 6f | 76 65 5f 62 79 5f 72 65 |alue..mo|ve_by_re|
|00000560| 63 6f 6d 70 69 6c 69 6e | 67 3f 09 5c 20 63 61 6e |compilin|g?.\ can|
|00000570| 20 77 65 20 74 72 79 20 | 74 6f 20 72 65 63 6f 6d | we try |to recom|
|00000580| 70 69 6c 65 20 61 6e 20 | 65 61 72 6c 69 65 72 0d |pile an |earlier.|
|00000590| 09 09 09 09 09 09 09 09 | 09 09 09 5c 20 20 6f 70 |........|...\ op|
|000005a0| 20 74 6f 20 61 76 6f 69 | 64 20 61 20 72 65 67 20 | to avoi|d a reg |
|000005b0| 6d 6f 76 65 3f 0d 0d 74 | 72 75 65 09 76 61 6c 75 |move?..t|rue.valu|
|000005c0| 65 09 09 6f 70 74 69 6d | 69 7a 65 5f 6c 65 61 66 |e..optim|ize_leaf|
|000005d0| 5f 63 61 6c 6c 73 3f 09 | 5c 20 64 6f 20 77 65 20 |_calls?.|\ do we |
|000005e0| 75 73 65 20 74 68 65 20 | 66 61 73 74 20 63 61 6c |use the |fast cal|
|000005f0| 6c 69 6e 67 20 73 65 71 | 75 65 6e 63 65 0d 09 09 |ling seq|uence...|
|00000600| 09 09 09 09 09 09 09 09 | 09 5c 20 20 66 6f 72 20 |........|.\ for |
|00000610| 6c 65 61 66 20 64 65 66 | 69 6e 69 74 69 6f 6e 73 |leaf def|initions|
|00000620| 3f 0d 0d 74 72 75 65 09 | 76 61 6c 75 65 09 09 6f |?..true.|value..o|
|00000630| 70 74 69 6d 69 7a 65 5f | 62 72 61 6e 63 68 65 73 |ptimize_|branches|
|00000640| 3f 09 09 5c 20 64 6f 20 | 77 65 20 73 69 6d 70 6c |?..\ do |we simpl|
|00000650| 69 66 79 20 62 72 61 6e | 63 68 65 73 20 6f 76 65 |ify bran|ches ove|
|00000660| 72 20 6f 74 68 65 72 0d | 09 09 09 09 09 09 09 09 |r other.|........|
|00000670| 09 09 09 5c 20 20 62 72 | 61 6e 63 68 65 73 2c 20 |...\ br|anches, |
|00000680| 62 72 61 6e 63 68 65 73 | 20 74 6f 20 74 68 65 20 |branches| to the |
|00000690| 6e 65 78 74 0d 09 09 09 | 09 09 09 09 09 09 09 09 |next....|........|
|000006a0| 5c 20 20 69 6e 73 74 72 | 75 63 74 69 6f 6e 2c 20 |\ instr|uction, |
|000006b0| 65 74 63 2e 3f 0d 0d 74 | 72 75 65 09 76 61 6c 75 |etc.?..t|rue.valu|
|000006c0| 65 09 09 63 61 73 63 61 | 64 65 3f 09 09 09 09 5c |e..casca|de?....\|
|000006d0| 20 64 6f 20 77 65 20 63 | 6f 6d 62 69 6e 65 20 6f | do we c|ombine o|
|000006e0| 70 73 20 69 6e 74 6f 20 | 73 69 6e 67 6c 65 0d 09 |ps into |single..|
|000006f0| 09 09 09 09 09 09 09 09 | 09 09 5c 20 20 69 6e 73 |........|..\ ins|
|00000700| 74 72 75 63 74 69 6f 6e | 73 20 77 68 65 72 65 20 |truction|s where |
|00000710| 77 65 20 63 61 6e 3f 0d | 0d 74 72 75 65 09 76 61 |we can?.|.true.va|
|00000720| 6c 75 65 09 09 72 61 6e | 67 65 5f 63 68 65 63 6b |lue..ran|ge_check|
|00000730| 3f 09 09 09 5c 20 64 6f | 20 77 65 20 72 61 6e 67 |?...\ do| we rang|
|00000740| 65 2d 63 68 65 63 6b 20 | 61 72 72 61 79 20 61 63 |e-check |array ac|
|00000750| 63 65 73 73 65 73 3f 0d | 0d 74 72 75 65 09 76 61 |cesses?.|.true.va|
|00000760| 6c 75 65 09 09 6d 75 6c | 74 69 70 6c 79 2d 61 64 |lue..mul|tiply-ad|
|00000770| 64 3f 09 09 09 5c 20 64 | 6f 20 77 65 20 63 61 73 |d?...\ d|o we cas|
|00000780| 63 61 64 65 20 61 20 66 | 6c 6f 61 74 69 6e 67 20 |cade a f|loating |
|00000790| 6d 75 6c 74 69 70 6c 79 | 0d 09 09 09 09 09 09 09 |multiply|........|
|000007a0| 09 09 09 09 5c 20 20 66 | 6f 6c 6c 6f 77 65 64 20 |....\ f|ollowed |
|000007b0| 62 79 20 61 6e 20 61 64 | 64 20 69 6e 74 6f 20 61 |by an ad|d into a|
|000007c0| 20 0d 09 09 09 09 09 09 | 09 09 09 09 09 5c 20 20 | .......|.....\ |
|000007d0| 66 6c 6f 61 74 69 6e 67 | 20 6d 75 6c 74 69 70 6c |floating| multipl|
|000007e0| 79 2d 61 64 64 20 69 6e | 73 74 72 75 63 74 69 6f |y-add in|structio|
|000007f0| 6e 0d 09 09 09 09 09 09 | 09 09 09 09 09 5c 20 20 |n.......|.....\ |
|00000800| 28 6f 72 20 6f 6e 65 20 | 6f 66 20 69 74 73 20 76 |(or one |of its v|
|00000810| 61 72 69 61 6e 74 73 29 | 3f 0d 0d 0d 5c 09 09 3d |ariants)|?...\..=|
|00000820| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 20 46 |========|====== F|
|00000830| 4f 52 57 41 52 44 20 44 | 45 46 4e 53 20 3d 3d 3d |ORWARD D|EFNS ===|
|00000840| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 0d 0d 66 |========|=====..f|
|00000850| 6f 72 77 61 72 64 20 2e | 47 0d 66 6f 72 77 61 72 |orward .|G.forwar|
|00000860| 64 20 2e 46 0d 66 6f 72 | 77 61 72 64 20 2e 43 0d |d .F.for|ward .C.|
|00000870| 66 6f 72 77 61 72 64 20 | 2e 47 53 0d 66 6f 72 77 |forward |.GS.forw|
|00000880| 61 72 64 20 2e 43 53 0d | 66 6f 72 77 61 72 64 20 |ard .CS.|forward |
|00000890| 2e 41 4c 0d 66 6f 72 77 | 61 72 64 20 2e 46 41 4c |.AL.forw|ard .FAL|
|000008a0| 0d 66 6f 72 77 61 72 64 | 20 2e 46 52 0d 66 6f 72 |.forward| .FR.for|
|000008b0| 77 61 72 64 20 5a 53 0d | 0d 0d 0d 5c 09 09 09 3d |ward ZS.|...\...=|
|000008c0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 20 4f |========|====== O|
|000008d0| 54 48 45 52 20 47 4c 4f | 42 41 4c 53 20 3d 3d 3d |THER GLO|BALS ===|
|000008e0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 0d 0d 09 30 09 |========|===...0.|
|000008f0| 76 61 6c 75 65 09 09 62 | 61 63 6b 73 74 6f 70 5f |value..b|ackstop_|
|00000900| 43 44 50 0d 09 30 09 76 | 61 6c 75 65 09 09 66 65 |CDP..0.v|alue..fe|
|00000910| 74 63 68 5f 62 61 63 6b | 73 74 6f 70 0d 09 30 09 |tch_back|stop..0.|
|00000920| 76 61 6c 75 65 09 09 62 | 61 73 69 63 5f 62 6c 6f |value..b|asic_blo|
|00000930| 63 6b 5f 73 74 61 72 74 | 0d 09 30 09 76 61 6c 75 |ck_start|..0.valu|
|00000940| 65 09 09 6c 6f 6f 70 5f | 73 74 61 72 74 0d 0d 09 |e..loop_|start...|
|00000950| 30 09 76 61 6c 75 65 09 | 09 6d 61 78 5f 63 61 6c |0.value.|.max_cal|
|00000960| 6c 65 64 5f 23 50 4c 0d | 09 30 09 76 61 6c 75 65 |led_#PL.|.0.value|
|00000970| 09 09 6d 61 78 5f 63 61 | 6c 6c 65 64 5f 23 46 50 |..max_ca|lled_#FP|
|00000980| 4c 0d 0d 66 61 6c 73 65 | 09 76 61 6c 75 65 09 09 |L..false|.value..|
|00000990| 65 71 75 61 6c 69 7a 69 | 6e 67 3f 0d 66 61 6c 73 |equalizi|ng?.fals|
|000009a0| 65 09 76 61 6c 75 65 09 | 09 65 71 5f 62 6c 6f 63 |e.value.|.eq_bloc|
|000009b0| 6b 5f 72 65 63 6f 6d 70 | 69 6c 69 6e 67 5f 6d 6f |k_recomp|iling_mo|
|000009c0| 76 65 3f 0d 0d 62 79 74 | 65 73 74 72 69 6e 67 09 |ve?..byt|estring.|
|000009d0| 09 09 65 71 5f 72 61 6e | 67 65 73 0d 62 79 74 65 |..eq_ran|ges.byte|
|000009e0| 73 74 72 69 6e 67 09 09 | 09 63 6f 6e 73 74 5f 64 |string..|.const_d|
|000009f0| 61 74 61 0d 62 79 74 65 | 73 74 72 69 6e 67 09 09 |ata.byte|string..|
|00000a00| 09 73 76 5f 63 6f 6e 73 | 74 5f 64 61 74 61 0d 0d |.sv_cons|t_data..|
|00000a10| 0d 30 09 09 63 6f 6e 73 | 74 61 6e 74 09 43 52 30 |.0..cons|tant.CR0|
|00000a20| 0d 0d 34 30 39 36 09 63 | 6f 6e 73 74 61 6e 74 09 |..4096.c|onstant.|
|00000a30| 73 79 73 5f 53 50 5f 66 | 72 61 6d 65 73 69 7a 65 |sys_SP_f|ramesize|
|00000a40| 0d 0d 38 09 09 63 6f 6e | 73 74 61 6e 74 09 46 50 |..8..con|stant.FP|
|00000a50| 63 65 6c 6c 0d 0d 28 2a | 20 57 65 20 64 6f 6e 27 |cell..(*| We don'|
|00000a60| 74 20 6d 6f 76 65 20 74 | 68 65 20 73 74 61 63 6b |t move t|he stack|
|00000a70| 20 70 6f 69 6e 74 65 72 | 73 20 65 76 65 72 79 20 | pointer|s every |
|00000a80| 74 69 6d 65 20 77 65 20 | 70 75 73 68 20 61 6e 64 |time we |push and|
|00000a90| 20 70 6f 70 20 73 6f 6d | 65 74 68 69 6e 67 0d 20 | pop som|ething. |
|00000aa0| 20 20 2d 20 72 61 74 68 | 65 72 2c 20 77 65 20 6b | - rath|er, we k|
|00000ab0| 65 65 70 20 74 72 61 63 | 6b 20 6f 66 20 74 68 65 |eep trac|k of the|
|00000ac0| 20 61 63 63 75 6d 75 6c | 61 74 65 64 20 6f 66 66 | accumul|ated off|
|00000ad0| 73 65 74 20 68 65 72 65 | 20 61 6e 64 20 6f 6e 6c |set here| and onl|
|00000ae0| 79 20 61 64 6a 75 73 74 | 0d 20 20 20 77 68 65 6e |y adjust|. when|
|00000af0| 20 77 65 20 68 61 76 65 | 20 74 6f 2e 0d 2a 29 0d | we have| to..*).|
|00000b00| 0d 30 09 76 61 6c 75 65 | 09 53 54 4b 5f 4f 46 46 |.0.value|.STK_OFF|
|00000b10| 53 45 54 09 0d 30 09 76 | 61 6c 75 65 09 46 53 54 |SET..0.v|alue.FST|
|00000b20| 4b 5f 4f 46 46 53 45 54 | 0d 0d 0d 5c 09 09 3d 3d |K_OFFSET|...\..==|
|00000b30| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 09 |========|=======.|
|00000b40| 4f 44 20 46 49 45 4c 44 | 20 56 41 4c 55 45 53 09 |OD FIELD| VALUES.|
|00000b50| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000b60| 3d 3d 0d 0d 5c 20 48 65 | 72 65 20 77 65 20 64 65 |==..\ He|re we de|
|00000b70| 66 69 6e 65 20 76 61 72 | 69 6f 75 73 20 76 61 6c |fine var|ious val|
|00000b80| 75 65 73 20 66 6f 72 20 | 4f 44 20 66 69 65 6c 64 |ues for |OD field|
|00000b90| 73 2e 20 20 57 65 20 67 | 65 6e 65 72 61 6c 6c 79 |s. We g|enerally|
|00000ba0| 20 75 73 65 20 74 68 65 | 20 73 61 6d 65 0d 5c 20 | use the| same.\ |
|00000bb0| 6e 61 6d 65 73 20 61 73 | 20 66 6f 72 20 74 68 65 |names as| for the|
|00000bc0| 20 36 38 6b 20 63 6f 64 | 65 20 67 65 6e 65 72 61 | 68k cod|e genera|
|00000bd0| 74 6f 72 2c 20 61 6c 74 | 68 6f 75 67 68 20 74 68 |tor, alt|hough th|
|00000be0| 65 20 76 61 6c 75 65 73 | 20 61 72 65 6e 27 74 20 |e values| aren't |
|00000bf0| 61 6c 6c 0d 5c 20 74 68 | 65 20 73 61 6d 65 20 28 |all.\ th|e same (|
|00000c00| 77 68 69 63 68 20 64 6f | 65 73 6e 27 74 20 6d 61 |which do|esn't ma|
|00000c10| 74 74 65 72 20 61 6e 79 | 77 61 79 29 2e 0d 0d 5c |tter any|way)...\|
|00000c20| 20 4d 6f 64 65 20 76 61 | 6c 75 65 73 3a 0d 0d 0d | Mode va|lues:...|
|00000c30| 65 6e 75 6d 20 7b 20 20 | 6d 64 47 50 52 20 6d 64 |enum { |mdGPR md|
|00000c40| 42 44 20 6d 64 41 62 73 | 20 6d 64 4c 69 74 20 6d |BD mdAbs| mdLit m|
|00000c50| 64 50 43 20 6d 64 46 50 | 6e 20 20 7d 0d 0d 50 50 |dPC mdFP|n }..PP|
|00000c60| 43 3f 20 5b 49 46 5d 20 | 68 65 78 78 20 5b 45 4c |C? [IF] |hexx [EL|
|00000c70| 53 45 5d 20 68 65 78 20 | 5b 54 48 45 4e 5d 0d 0d |SE] hex |[THEN]..|
|00000c80| 5c 20 46 6c 61 67 20 62 | 79 74 65 20 62 69 74 73 |\ Flag b|yte bits|
|00000c90| 3a 0d 0d 5c 20 30 09 63 | 6f 6e 73 74 61 6e 74 09 |:..\ 0.c|onstant.|
|00000ca0| 66 6c 45 78 74 09 09 5c | 20 53 69 67 6e 20 65 78 |flExt..\| Sign ex|
|00000cb0| 74 65 6e 64 0d 31 09 63 | 6f 6e 73 74 61 6e 74 09 |tend.1.c|onstant.|
|00000cc0| 66 62 45 78 74 0d 0d 5c | 20 31 09 63 6f 6e 73 74 |fbExt..\| 1.const|
|00000cd0| 61 6e 74 09 66 6c 46 50 | 09 09 5c 20 46 6c 6f 61 |ant.flFP|..\ Floa|
|00000ce0| 74 69 6e 67 20 6f 70 65 | 72 61 74 69 6f 6e 0d 5c |ting ope|ration.\|
|00000cf0| 20 32 09 63 6f 6e 73 74 | 61 6e 74 09 66 62 46 50 | 2.const|ant.fbFP|
|00000d00| 0d 0d 28 2a 0d 32 09 63 | 6f 6e 73 74 61 6e 74 09 |..(*.2.c|onstant.|
|00000d10| 66 6c 4c 69 74 09 09 5c | 20 46 6c 6f 61 74 69 6e |flLit..\| Floatin|
|00000d20| 67 20 4c 69 74 65 72 61 | 6c 0d 34 09 63 6f 6e 73 |g Litera|l.4.cons|
|00000d30| 74 61 6e 74 09 66 62 4c | 69 74 0d 0d 33 09 63 6f |tant.fbL|it..3.co|
|00000d40| 6e 73 74 61 6e 74 09 66 | 6c 46 43 52 09 09 5c 20 |nstant.f|lFCR..\ |
|00000d50| 46 50 55 20 63 6f 6e 73 | 74 61 6e 74 20 52 4f 4d |FPU cons|tant ROM|
|00000d60| 20 72 65 66 65 72 65 6e | 63 65 0d 38 09 63 6f 6e | referen|ce.8.con|
|00000d70| 73 74 61 6e 74 09 66 62 | 46 43 52 0d 2a 29 0d 0d |stant.fb|FCR.*)..|
|00000d80| 0d 5c 20 4f 70 65 72 61 | 74 69 6f 6e 20 74 79 70 |.\ Opera|tion typ|
|00000d90| 65 20 76 61 6c 75 65 73 | 20 28 6f 70 54 79 70 65 |e values| (opType|
|00000da0| 29 3a 0d 0d 5c 20 30 20 | 6d 65 61 6e 73 20 65 6d |):..\ 0 |means em|
|00000db0| 70 74 79 2c 20 31 20 74 | 6f 20 37 20 6d 65 61 6e |pty, 1 t|o 7 mean|
|00000dc0| 20 6e 6f 74 20 65 6d 70 | 74 79 20 62 75 74 20 75 | not emp|ty but u|
|00000dd0| 6e 6b 6e 6f 77 6e 20 66 | 6f 72 20 73 6f 6d 65 20 |nknown f|or some |
|00000de0| 72 65 61 73 6f 6e 2e 0d | 5c 20 20 53 6f 20 66 61 |reason..|\ So fa|
|00000df0| 72 20 77 65 27 76 65 20 | 6f 6e 6c 79 20 64 65 66 |r we've |only def|
|00000e00| 69 6e 65 64 20 31 2d 33 | 2e 0d 0d 31 09 63 6f 6e |ined 1-3|...1.con|
|00000e10| 73 74 61 6e 74 09 6f 74 | 55 6e 6b 6e 6f 77 6e 09 |stant.ot|Unknown.|
|00000e20| 09 5c 20 69 73 6e 27 74 | 20 65 6d 70 74 79 2c 20 |.\ isn't| empty, |
|00000e30| 62 75 74 20 77 65 20 64 | 6f 6e 27 74 20 6b 6e 6f |but we d|on't kno|
|00000e40| 77 20 61 6e 79 74 68 69 | 6e 67 20 61 62 6f 75 74 |w anythi|ng about|
|00000e50| 0d 09 09 09 09 09 09 09 | 09 5c 20 20 74 68 65 20 |........|.\ the |
|00000e60| 63 6f 6e 74 65 6e 74 73 | 0d 32 09 63 6f 6e 73 74 |contents|.2.const|
|00000e70| 61 6e 74 09 6f 74 55 6e | 6b 53 74 6f 72 65 64 09 |ant.otUn|kStored.|
|00000e80| 09 5c 20 64 69 74 74 6f | 2c 20 62 75 74 20 77 65 |.\ ditto|, but we|
|00000e90| 27 76 65 20 73 74 6f 72 | 65 64 20 69 74 20 61 6e |'ve stor|ed it an|
|00000ea0| 64 20 73 6f 20 6d 69 67 | 68 74 20 62 65 0d 09 09 |d so mig|ht be...|
|00000eb0| 09 09 09 09 09 09 5c 20 | 20 61 62 6c 65 20 74 6f |......\ | able to|
|00000ec0| 20 6f 70 74 69 6d 69 7a | 65 20 61 20 66 65 74 63 | optimiz|e a fetc|
|00000ed0| 68 20 66 72 6f 6d 20 74 | 68 65 20 73 61 6d 65 0d |h from t|he same.|
|00000ee0| 09 09 09 09 09 09 09 09 | 5c 20 20 6c 6f 63 61 74 |........|\ locat|
|00000ef0| 69 6f 6e 2c 20 65 76 65 | 6e 20 74 68 6f 20 77 65 |ion, eve|n tho we|
|00000f00| 20 64 6f 6e 27 74 20 6b | 6e 6f 77 20 69 74 73 20 | don't k|now its |
|00000f10| 74 79 70 65 0d 33 09 63 | 6f 6e 73 74 61 6e 74 09 |type.3.c|onstant.|
|00000f20| 6f 74 55 6e 6b 50 75 6c | 6c 65 64 09 09 5c 20 64 |otUnkPul|led..\ d|
|00000f30| 69 74 74 6f 2c 20 70 75 | 6c 6c 65 64 20 66 72 6f |itto, pu|lled fro|
|00000f40| 6d 20 6d 65 6d 6f 72 79 | 20 70 61 72 74 20 6f 66 |m memory| part of|
|00000f50| 20 73 74 61 63 6b 0d 0d | 37 09 63 6f 6e 73 74 61 | stack..|7.consta|
|00000f60| 6e 74 09 6f 74 55 6e 6b | 6e 6f 77 6e 43 6f 64 65 |nt.otUnk|nownCode|
|00000f70| 73 09 5c 20 61 6c 6c 20 | 63 6f 64 65 73 20 6c 65 |s.\ all |codes le|
|00000f80| 73 73 20 74 68 61 6e 20 | 6f 72 20 65 71 75 61 6c |ss than |or equal|
|00000f90| 20 74 6f 20 74 68 69 73 | 20 61 72 65 0d 09 09 09 | to this| are....|
|00000fa0| 09 09 09 09 09 5c 20 20 | 73 6f 6d 65 20 6b 69 6e |.....\ |some kin|
|00000fb0| 64 20 6f 66 20 65 6d 70 | 74 79 2f 75 6e 6b 6e 6f |d of emp|ty/unkno|
|00000fc0| 77 6e 0d 09 09 09 0d 38 | 09 63 6f 6e 73 74 61 6e |wn.....8|.constan|
|00000fd0| 74 09 6f 74 4d 6f 76 65 | 09 09 09 5c 20 72 65 67 |t.otMove|...\ reg|
|00000fe0| 20 6d 6f 76 65 0d 0d 0d | 5c 20 74 68 65 20 66 6f | move...|\ the fo|
|00000ff0| 6c 6c 6f 77 69 6e 67 20 | 61 72 65 20 61 6c 73 6f |llowing |are also|
|00001000| 20 6f 6e 20 74 68 65 20 | 36 38 6b 2c 20 61 6e 64 | on the |68k, and|
|00001010| 20 69 6e 20 74 61 72 67 | 65 74 20 63 6f 6d 70 69 | in targ|et compi|
|00001020| 6c 61 74 69 6f 6e 20 74 | 68 65 79 0d 5c 20 20 64 |lation t|hey.\ d|
|00001030| 69 73 70 61 74 63 68 20 | 74 6f 20 75 73 20 66 72 |ispatch |to us fr|
|00001040| 6f 6d 20 74 68 65 20 36 | 38 6b 20 69 6e 74 65 72 |om the 6|8k inter|
|00001050| 70 72 65 74 65 72 20 75 | 73 69 6e 67 20 74 68 65 |preter u|sing the|
|00001060| 73 65 20 63 6f 64 65 73 | 2c 20 73 6f 20 77 65 20 |se codes|, so we |
|00001070| 0d 5c 20 20 63 61 6e 27 | 74 20 63 68 61 6e 67 65 |.\ can'|t change|
|00001080| 20 74 68 65 6d 21 0d 0d | 31 32 09 63 6f 6e 73 74 | them!..|12.const|
|00001090| 61 6e 74 09 6f 74 4d 55 | 4c 0d 31 33 09 63 6f 6e |ant.otMU|L.13.con|
|000010a0| 73 74 61 6e 74 09 6f 74 | 44 49 56 0d 31 34 09 63 |stant.ot|DIV.14.c|
|000010b0| 6f 6e 73 74 61 6e 74 09 | 6f 74 55 44 49 56 0d 0d |onstant.|otUDIV..|
|000010c0| 5c 20 74 68 65 20 66 6f | 6c 6c 6f 77 69 6e 67 20 |\ the fo|llowing |
|000010d0| 61 72 65 20 50 50 43 20 | 6f 6e 6c 79 3a 0d 0d 31 |are PPC |only:..1|
|000010e0| 30 09 63 6f 6e 73 74 61 | 6e 74 09 6f 74 4d 55 4c |0.consta|nt.otMUL|
|000010f0| 48 09 09 09 5c 20 6d 75 | 6c 74 69 70 6c 79 20 68 |H...\ mu|ltiply h|
|00001100| 69 67 68 0d 31 31 09 63 | 6f 6e 73 74 61 6e 74 09 |igh.11.c|onstant.|
|00001110| 6f 74 55 4d 55 4c 48 09 | 09 09 5c 20 6d 75 6c 74 |otUMULH.|..\ mult|
|00001120| 69 70 6c 79 20 68 69 67 | 68 0d 31 36 09 63 6f 6e |iply hig|h.16.con|
|00001130| 73 74 61 6e 74 09 6f 74 | 41 64 64 63 0d 5c 20 31 |stant.ot|Addc.\ 1|
|00001140| 37 09 63 6f 6e 73 74 61 | 6e 74 09 6f 74 41 64 64 |7.consta|nt.otAdd|
|00001150| 69 63 0d 31 37 09 63 6f | 6e 73 74 61 6e 74 09 6f |ic.17.co|nstant.o|
|00001160| 74 41 64 64 65 0d 31 38 | 09 63 6f 6e 73 74 61 6e |tAdde.18|.constan|
|00001170| 74 09 6f 74 41 64 64 7a | 65 0d 31 39 09 63 6f 6e |t.otAddz|e.19.con|
|00001180| 73 74 61 6e 74 09 6f 74 | 41 64 64 6d 65 0d 0d 31 |stant.ot|Addme..1|
|00001190| 41 09 63 6f 6e 73 74 61 | 6e 74 09 6f 74 53 75 62 |A.consta|nt.otSub|
|000011a0| 66 63 0d 5c 20 31 43 09 | 63 6f 6e 73 74 61 6e 74 |fc.\ 1C.|constant|
|000011b0| 09 6f 74 53 75 62 66 69 | 63 0d 31 42 09 63 6f 6e |.otSubfi|c.1B.con|
|000011c0| 73 74 61 6e 74 09 6f 74 | 53 75 62 66 65 0d 31 43 |stant.ot|Subfe.1C|
|000011d0| 09 63 6f 6e 73 74 61 6e | 74 09 6f 74 53 75 62 66 |.constan|t.otSubf|
|000011e0| 7a 65 0d 31 44 09 63 6f | 6e 73 74 61 6e 74 09 6f |ze.1D.co|nstant.o|
|000011f0| 74 53 75 62 66 6d 65 0d | 0d 5c 20 74 68 65 73 65 |tSubfme.|.\ these|
|00001200| 20 66 6f 6c 6c 6f 77 69 | 6e 67 20 61 72 65 20 61 | followi|ng are a|
|00001210| 6c 73 6f 20 36 38 6b 20 | 63 6f 64 65 73 2c 20 61 |lso 68k |codes, a|
|00001220| 6e 64 20 63 61 6e 27 74 | 20 63 68 61 6e 67 65 0d |nd can't| change.|
|00001230| 0d 32 31 09 63 6f 6e 73 | 74 61 6e 74 09 6f 74 41 |.21.cons|tant.otA|
|00001240| 44 44 0d 32 32 09 63 6f | 6e 73 74 61 6e 74 09 6f |DD.22.co|nstant.o|
|00001250| 74 53 55 42 0d 32 33 09 | 63 6f 6e 73 74 61 6e 74 |tSUB.23.|constant|
|00001260| 09 6f 74 41 4e 44 0d 32 | 34 09 63 6f 6e 73 74 61 |.otAND.2|4.consta|
|00001270| 6e 74 09 6f 74 4f 52 0d | 32 35 09 63 6f 6e 73 74 |nt.otOR.|25.const|
|00001280| 61 6e 74 09 6f 74 58 4f | 52 0d 32 36 09 63 6f 6e |ant.otXO|R.26.con|
|00001290| 73 74 61 6e 74 09 6f 74 | 43 4d 50 0d 32 37 09 63 |stant.ot|CMP.27.c|
|000012a0| 6f 6e 73 74 61 6e 74 09 | 6f 74 55 43 4d 50 09 09 |onstant.|otUCMP..|
|000012b0| 09 5c 20 75 6e 73 69 67 | 6e 65 64 20 63 6f 6d 70 |.\ unsig|ned comp|
|000012c0| 61 72 65 20 2d 20 50 50 | 43 20 6f 6e 6c 79 0d 0d |are - PP|C only..|
|000012d0| 32 38 09 63 6f 6e 73 74 | 61 6e 74 09 6f 74 4e 45 |28.const|ant.otNE|
|000012e0| 47 0d 32 39 09 63 6f 6e | 73 74 61 6e 74 09 6f 74 |G.29.con|stant.ot|
|000012f0| 4e 4f 54 0d 0d 32 41 09 | 63 6f 6e 73 74 61 6e 74 |NOT..2A.|constant|
|00001300| 09 6f 74 53 68 69 66 74 | 0d 32 42 09 63 6f 6e 73 |.otShift|.2B.cons|
|00001310| 74 61 6e 74 09 6f 74 53 | 68 69 66 74 26 6d 61 73 |tant.otS|hift&mas|
|00001320| 6b 09 5c 20 50 50 43 20 | 6f 6e 6c 79 0d 32 43 09 |k.\ PPC |only.2C.|
|00001330| 63 6f 6e 73 74 61 6e 74 | 09 6f 74 54 72 61 70 09 |constant|.otTrap.|
|00001340| 09 09 5c 20 64 69 74 74 | 6f 0d 0d 33 30 09 63 6f |..\ ditt|o..30.co|
|00001350| 6e 73 74 61 6e 74 09 6f | 74 50 4d 65 6e 64 09 09 |nstant.o|tPMend..|
|00001360| 09 5c 20 45 6e 64 20 6f | 66 20 69 6e 74 65 67 65 |.\ End o|f intege|
|00001370| 72 20 6f 70 73 0d 0d 5c | 20 33 46 09 63 6f 6e 73 |r ops..\| 3F.cons|
|00001380| 74 61 6e 74 09 6f 74 46 | 50 63 6d 70 09 09 5c 20 |tant.otF|Pcmp..\ |
|00001390| 46 6c 6f 61 74 69 6e 67 | 2d 70 6f 69 6e 74 20 63 |Floating|-point c|
|000013a0| 6f 6d 70 61 72 69 73 6f | 6e 2e 20 20 41 20 73 70 |ompariso|n. A sp|
|000013b0| 65 63 69 61 6c 20 63 61 | 73 65 2e 0d 34 30 09 63 |ecial ca|se..40.c|
|000013c0| 6f 6e 73 74 61 6e 74 09 | 6f 74 46 50 73 74 61 72 |onstant.|otFPstar|
|000013d0| 74 09 09 5c 20 53 74 61 | 72 74 20 6f 66 20 72 65 |t..\ Sta|rt of re|
|000013e0| 67 75 6c 61 72 20 66 6c | 6f 61 74 69 6e 67 2d 70 |gular fl|oating-p|
|000013f0| 6f 69 6e 74 20 6f 70 73 | 2e 20 20 4e 6f 74 65 20 |oint ops|. Note |
|00001400| 0d 09 09 09 09 09 09 09 | 09 5c 20 20 74 68 65 73 |........|.\ thes|
|00001410| 65 20 61 72 65 20 4e 4f | 54 20 69 6e 20 74 68 65 |e are NO|T in the|
|00001420| 20 73 61 6d 65 20 6f 72 | 64 65 72 20 61 73 20 74 | same or|der as t|
|00001430| 68 65 20 0d 09 09 09 09 | 09 09 09 09 5c 20 20 69 |he .....|....\ i|
|00001440| 6e 74 65 67 65 72 20 6f | 70 73 2e 0d 34 30 09 63 |nteger o|ps..40.c|
|00001450| 6f 6e 73 74 61 6e 74 09 | 6f 74 46 4d 4f 56 45 0d |onstant.|otFMOVE.|
|00001460| 34 31 09 63 6f 6e 73 74 | 61 6e 74 09 6f 74 46 41 |41.const|ant.otFA|
|00001470| 44 44 0d 34 32 09 63 6f | 6e 73 74 61 6e 74 09 6f |DD.42.co|nstant.o|
|00001480| 74 46 4d 55 4c 0d 34 33 | 09 63 6f 6e 73 74 61 6e |tFMUL.43|.constan|
|00001490| 74 09 6f 74 46 4d 41 44 | 44 09 09 09 5c 20 6d 75 |t.otFMAD|D...\ mu|
|000014a0| 6c 74 69 70 6c 79 2d 61 | 64 64 20 2d 20 50 50 43 |ltiply-a|dd - PPC|
|000014b0| 20 6f 6e 6c 79 0d 34 34 | 09 63 6f 6e 73 74 61 6e | only.44|.constan|
|000014c0| 74 09 6f 74 46 4e 4d 53 | 55 42 09 09 5c 20 6e 65 |t.otFNMS|UB..\ ne|
|000014d0| 67 61 74 69 76 65 20 6d | 75 6c 74 69 70 6c 79 2d |gative m|ultiply-|
|000014e0| 73 75 62 74 72 61 63 74 | 20 2d 20 41 6c 74 69 56 |subtract| - AltiV|
|000014f0| 65 63 20 6f 6e 6c 79 0d | 0d 34 38 09 63 6f 6e 73 |ec only.|.48.cons|
|00001500| 74 61 6e 74 09 6f 74 46 | 50 6e 6f 6e 63 6f 6d 09 |tant.otF|Pnoncom.|
|00001510| 09 5c 20 54 68 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 |.\ The f|ollowing|
|00001520| 20 46 50 20 6f 70 73 20 | 61 72 65 20 6e 6f 6e 2d | FP ops |are non-|
|00001530| 63 6f 6d 6d 75 74 61 74 | 69 76 65 0d 0d 34 38 09 |commutat|ive..48.|
|00001540| 63 6f 6e 73 74 61 6e 74 | 09 6f 74 46 53 55 42 0d |constant|.otFSUB.|
|00001550| 34 39 09 63 6f 6e 73 74 | 61 6e 74 09 6f 74 46 44 |49.const|ant.otFD|
|00001560| 49 56 0d 0d 34 46 09 63 | 6f 6e 73 74 61 6e 74 09 |IV..4F.c|onstant.|
|00001570| 6f 74 46 50 63 6d 70 09 | 09 09 5c 20 46 50 20 63 |otFPcmp.|..\ FP c|
|00001580| 6f 6d 70 61 72 69 73 6f | 6e 73 0d 0d 31 36 30 09 |ompariso|ns..160.|
|00001590| 63 6f 6e 73 74 61 6e 74 | 09 6f 74 46 50 73 74 6f |constant|.otFPsto|
|000015a0| 72 65 0d 31 36 32 09 63 | 6f 6e 73 74 61 6e 74 09 |re.162.c|onstant.|
|000015b0| 6f 74 46 50 66 65 74 63 | 68 0d 0d 35 34 09 63 6f |otFPfetc|h..54.co|
|000015c0| 6e 73 74 61 6e 74 09 6f | 74 46 50 6d 6f 6e 09 09 |nstant.o|tFPmon..|
|000015d0| 09 5c 20 54 68 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 |.\ The f|ollowing|
|000015e0| 20 46 50 20 6f 70 73 20 | 61 72 65 20 6d 6f 6e 61 | FP ops |are mona|
|000015f0| 64 69 63 0d 0d 28 2a 09 | 09 77 65 20 64 6f 6e 27 |dic..(*.|.we don'|
|00001600| 74 20 62 6f 74 68 65 72 | 20 69 6e 63 6c 75 64 69 |t bother| includi|
|00001610| 6e 67 20 74 68 65 73 65 | 20 69 6e 20 74 68 65 20 |ng these| in the |
|00001620| 64 69 63 74 69 6f 6e 61 | 72 79 2c 20 62 75 74 20 |dictiona|ry, but |
|00001630| 74 68 65 73 65 0d 09 09 | 61 72 65 20 74 68 65 20 |these...|are the |
|00001640| 76 61 6c 75 65 73 3a 0d | 0d 35 34 09 63 6f 6e 73 |values:.|.54.cons|
|00001650| 74 61 6e 74 09 6f 74 46 | 41 42 53 0d 35 35 09 63 |tant.otF|ABS.55.c|
|00001660| 6f 6e 73 74 61 6e 74 09 | 6f 74 46 4e 45 47 0d 35 |onstant.|otFNEG.5|
|00001670| 36 09 63 6f 6e 73 74 61 | 6e 74 09 6f 74 46 53 49 |6.consta|nt.otFSI|
|00001680| 4e 0d 35 37 09 63 6f 6e | 73 74 61 6e 74 09 6f 74 |N.57.con|stant.ot|
|00001690| 46 43 4f 53 0d 35 38 09 | 63 6f 6e 73 74 61 6e 74 |FCOS.58.|constant|
|000016a0| 09 6f 74 46 54 41 4e 0d | 35 39 09 63 6f 6e 73 74 |.otFTAN.|59.const|
|000016b0| 61 6e 74 09 6f 74 46 41 | 54 41 4e 0d 35 41 09 63 |ant.otFA|TAN.5A.c|
|000016c0| 6f 6e 73 74 61 6e 74 09 | 6f 74 46 53 51 52 54 0d |onstant.|otFSQRT.|
|000016d0| 2a 29 0d 0d 35 46 09 63 | 6f 6e 73 74 61 6e 74 09 |*)..5F.c|onstant.|
|000016e0| 6f 74 46 50 65 6e 64 09 | 09 09 5c 20 45 6e 64 20 |otFPend.|..\ End |
|000016f0| 6f 66 20 46 50 20 6f 70 | 73 0d 0d 36 30 09 63 6f |of FP op|s..60.co|
|00001700| 6e 73 74 61 6e 74 09 6f | 74 53 74 6f 72 65 09 09 |nstant.o|tStore..|
|00001710| 09 5c 20 53 74 6f 72 65 | 0d 36 32 09 63 6f 6e 73 |.\ Store|.62.cons|
|00001720| 74 61 6e 74 09 6f 74 46 | 65 74 63 68 09 09 09 5c |tant.otF|etch...\|
|00001730| 20 44 69 72 65 63 74 20 | 66 65 74 63 68 0d 0d 5c | Direct |fetch..\|
|00001740| 20 6f 74 46 65 74 63 68 | 0d 5c 09 63 6f 6e 73 74 | otFetch|.\.const|
|00001750| 61 6e 74 09 6f 74 41 74 | 09 09 09 5c 20 49 6e 64 |ant.otAt|...\ Ind|
|00001760| 69 72 65 63 74 20 66 65 | 74 63 68 20 2d 20 65 6e |irect fe|tch - en|
|00001770| 64 73 20 75 70 20 62 65 | 69 6e 67 20 74 72 65 61 |ds up be|ing trea|
|00001780| 74 65 64 0d 09 09 09 09 | 09 09 09 09 5c 09 74 68 |ted.....|....\.th|
|00001790| 65 20 73 61 6d 65 0d 0d | 36 32 09 63 6f 6e 73 74 |e same..|62.const|
|000017a0| 61 6e 74 09 6f 74 44 55 | 50 09 09 09 5c 20 53 74 |ant.otDU|P...\ St|
|000017b0| 61 63 6b 20 73 68 75 66 | 66 6c 69 6e 67 0d 36 33 |ack shuf|fling.63|
|000017c0| 09 63 6f 6e 73 74 61 6e | 74 09 6f 74 32 44 55 50 |.constan|t.ot2DUP|
|000017d0| 0d 36 34 09 63 6f 6e 73 | 74 61 6e 74 09 6f 74 44 |.64.cons|tant.otD|
|000017e0| 52 4f 50 0d 36 35 09 63 | 6f 6e 73 74 61 6e 74 09 |ROP.65.c|onstant.|
|000017f0| 6f 74 32 44 52 4f 50 0d | 36 36 09 63 6f 6e 73 74 |ot2DROP.|66.const|
|00001800| 61 6e 74 09 6f 74 53 57 | 41 50 0d 36 37 09 63 6f |ant.otSW|AP.67.co|
|00001810| 6e 73 74 61 6e 74 09 6f | 74 4f 56 45 52 0d 0d 28 |nstant.o|tOVER..(|
|00001820| 2a 09 61 67 61 69 6e 20 | 77 65 20 64 6f 6e 27 74 |*.again |we don't|
|00001830| 20 62 6f 74 68 65 72 20 | 69 6e 63 6c 75 64 69 6e | bother |includin|
|00001840| 67 20 74 68 65 73 65 20 | 69 6e 20 74 68 65 20 64 |g these |in the d|
|00001850| 69 63 74 69 6f 6e 61 72 | 79 2c 20 62 75 74 20 0d |ictionar|y, but .|
|00001860| 09 74 68 65 73 65 20 61 | 72 65 20 74 68 65 20 76 |.these a|re the v|
|00001870| 61 6c 75 65 73 3a 0d 0d | 36 38 09 63 6f 6e 73 74 |alues:..|68.const|
|00001880| 61 6e 74 09 6f 74 4e 49 | 50 0d 36 39 09 63 6f 6e |ant.otNI|P.69.con|
|00001890| 73 74 61 6e 74 09 6f 74 | 54 55 43 4b 0d 36 41 09 |stant.ot|TUCK.6A.|
|000018a0| 63 6f 6e 73 74 61 6e 74 | 09 6f 74 52 4f 54 0d 36 |constant|.otROT.6|
|000018b0| 42 09 63 6f 6e 73 74 61 | 6e 74 09 6f 74 44 4f 57 |B.consta|nt.otDOW|
|000018c0| 4e 0d 36 43 09 63 6f 6e | 73 74 61 6e 74 09 6f 74 |N.6C.con|stant.ot|
|000018d0| 32 53 57 41 50 0d 0d 46 | 6f 72 20 46 50 20 73 74 |2SWAP..F|or FP st|
|000018e0| 61 63 6b 20 73 68 75 66 | 66 6c 69 6e 67 2c 20 77 |ack shuf|fling, w|
|000018f0| 65 27 6c 6c 20 75 73 65 | 20 74 68 65 20 63 6f 72 |e'll use| the cor|
|00001900| 72 65 73 70 6f 6e 64 69 | 6e 67 0d 20 6f 70 63 6f |respondi|ng. opco|
|00001910| 64 65 73 20 69 6e 20 74 | 68 65 20 72 61 6e 67 65 |des in t|he range|
|00001920| 20 37 32 20 2d 20 37 42 | 2e 0d 0d 57 65 27 6c 6c | 72 - 7B|...We'll|
|00001930| 20 75 73 65 20 6f 70 63 | 6f 64 65 73 20 69 6e 20 | use opc|odes in |
|00001940| 74 68 65 20 72 61 6e 67 | 65 20 38 30 20 2d 20 41 |the rang|e 80 - A|
|00001950| 30 20 66 6f 72 20 75 6e | 69 71 75 65 20 41 6c 74 |0 for un|ique Alt|
|00001960| 69 56 65 63 20 6f 70 73 | 20 6c 69 6b 65 0d 76 65 |iVec ops| like.ve|
|00001970| 63 74 6f 72 20 73 70 6c | 61 74 20 74 68 61 74 20 |ctor spl|at that |
|00001980| 68 61 76 65 20 6e 6f 20 | 73 63 61 6c 61 72 20 65 |have no |scalar e|
|00001990| 71 75 69 76 61 6c 65 6e | 74 73 3a 0d 0d 38 30 09 |quivalen|ts:..80.|
|000019a0| 76 65 63 74 6f 72 20 73 | 70 6c 61 74 0d 38 31 09 |vector s|plat.81.|
|000019b0| 76 65 63 74 6f 72 20 73 | 70 6c 61 74 20 69 6d 6d |vector s|plat imm|
|000019c0| 65 64 69 61 74 65 0d 0d | 39 30 09 76 65 63 74 6f |ediate..|90.vecto|
|000019d0| 72 20 73 65 6c 65 63 74 | 0d 39 31 09 76 65 63 74 |r select|.91.vect|
|000019e0| 6f 72 20 70 65 72 6d 75 | 74 65 0d 0d 2a 29 0d 0d |or permu|te..*)..|
|000019f0| 0d 32 30 30 09 63 6f 6e | 73 74 61 6e 74 09 6f 74 |.200.con|stant.ot|
|00001a00| 56 65 63 4f 66 66 73 65 | 74 09 09 5c 20 61 6c 6c |VecOffse|t..\ all|
|00001a10| 20 76 65 63 74 6f 72 20 | 6f 70 73 20 68 61 76 65 | vector |ops have|
|00001a20| 20 74 68 69 73 20 62 69 | 74 20 73 65 74 20 73 6f | this bi|t set so|
|00001a30| 20 77 65 0d 09 09 09 09 | 09 09 09 09 5c 20 20 63 | we.....|....\ c|
|00001a40| 61 6e 20 72 65 63 6f 67 | 6e 69 7a 65 20 74 68 65 |an recog|nize the|
|00001a50| 6d 20 71 75 69 63 6b 6c | 79 2e 0d 0d 0d 5c 20 53 |m quickl|y....\ S|
|00001a60| 75 62 74 79 70 65 20 62 | 79 74 65 20 76 61 6c 75 |ubtype b|yte valu|
|00001a70| 65 73 3a 0d 0d 5c 20 46 | 6f 72 20 63 6f 6d 70 61 |es:..\ F|or compa|
|00001a80| 72 69 73 6f 6e 73 2c 20 | 74 68 65 20 74 6f 70 20 |risons, |the top |
|00001a90| 34 20 62 69 74 73 20 6f | 66 20 74 68 65 20 62 79 |4 bits o|f the by|
|00001aa0| 74 65 20 67 69 76 65 20 | 74 68 65 20 63 6f 6e 64 |te give |the cond|
|00001ab0| 69 74 69 6f 6e 20 72 65 | 67 69 73 74 65 72 20 66 |ition re|gister f|
|00001ac0| 69 65 6c 64 0d 5c 20 62 | 69 74 20 77 68 69 63 68 |ield.\ b|it which|
|00001ad0| 20 77 65 20 6e 65 65 64 | 20 74 6f 20 62 72 61 6e | we need| to bran|
|00001ae0| 63 68 20 6f 6e 20 66 6f | 72 20 74 68 69 73 20 63 |ch on fo|r this c|
|00001af0| 6f 6e 64 69 74 69 6f 6e | 3a 20 20 4c 54 20 3d 20 |ondition|: LT = |
|00001b00| 30 2c 20 47 54 20 3d 20 | 31 2c 20 45 51 20 3d 20 |0, GT = |1, EQ = |
|00001b10| 32 2e 0d 5c 20 54 68 65 | 20 6c 6f 77 20 62 69 74 |2..\ The| low bit|
|00001b20| 20 28 62 69 74 20 37 29 | 20 69 73 20 31 20 69 66 | (bit 7)| is 1 if|
|00001b30| 20 74 68 65 20 63 6f 6e | 64 69 74 69 6f 6e 20 77 | the con|dition w|
|00001b40| 65 20 77 61 6e 74 20 68 | 61 73 20 61 20 66 69 65 |e want h|as a fie|
|00001b50| 6c 64 20 62 69 74 20 76 | 61 6c 75 65 20 6f 66 20 |ld bit v|alue of |
|00001b60| 31 2e 0d 5c 20 42 69 74 | 20 36 20 69 73 20 31 20 |1..\ Bit| 6 is 1 |
|00001b70| 66 6f 72 20 75 6e 73 69 | 67 6e 65 64 2c 20 61 6e |for unsi|gned, an|
|00001b80| 64 20 62 69 74 20 35 20 | 69 73 20 31 20 66 6f 72 |d bit 5 |is 1 for|
|00001b90| 20 63 6f 6d 70 61 72 69 | 73 6f 6e 73 20 77 69 74 | compari|sons wit|
|00001ba0| 68 20 7a 65 72 6f 2e 0d | 0d 32 30 09 63 6f 6e 73 |h zero..|.20.cons|
|00001bb0| 74 61 6e 74 09 63 6d 70 | 4e 45 0d 32 31 09 63 6f |tant.cmp|NE.21.co|
|00001bc0| 6e 73 74 61 6e 74 09 63 | 6d 70 45 51 0d 30 30 09 |nstant.c|mpEQ.00.|
|00001bd0| 63 6f 6e 73 74 61 6e 74 | 09 63 6d 70 47 45 0d 30 |constant|.cmpGE.0|
|00001be0| 31 09 63 6f 6e 73 74 61 | 6e 74 09 63 6d 70 4c 54 |1.consta|nt.cmpLT|
|00001bf0| 0d 31 30 09 63 6f 6e 73 | 74 61 6e 74 09 63 6d 70 |.10.cons|tant.cmp|
|00001c00| 4c 45 0d 31 31 09 63 6f | 6e 73 74 61 6e 74 09 63 |LE.11.co|nstant.c|
|00001c10| 6d 70 47 54 0d 30 32 09 | 63 6f 6e 73 74 61 6e 74 |mpGT.02.|constant|
|00001c20| 09 63 6d 70 48 53 0d 30 | 33 09 63 6f 6e 73 74 61 |.cmpHS.0|3.consta|
|00001c30| 6e 74 09 63 6d 70 4c 4f | 0d 31 32 09 63 6f 6e 73 |nt.cmpLO|.12.cons|
|00001c40| 74 61 6e 74 09 63 6d 70 | 4c 53 0d 31 33 09 63 6f |tant.cmp|LS.13.co|
|00001c50| 6e 73 74 61 6e 74 09 63 | 6d 70 48 49 0d 0d 32 34 |nstant.c|mpHI..24|
|00001c60| 09 63 6f 6e 73 74 61 6e | 74 09 63 6d 70 5a 4e 45 |.constan|t.cmpZNE|
|00001c70| 0d 32 35 09 63 6f 6e 73 | 74 61 6e 74 09 63 6d 70 |.25.cons|tant.cmp|
|00001c80| 5a 45 51 0d 30 34 09 63 | 6f 6e 73 74 61 6e 74 09 |ZEQ.04.c|onstant.|
|00001c90| 63 6d 70 5a 47 45 0d 30 | 35 09 63 6f 6e 73 74 61 |cmpZGE.0|5.consta|
|00001ca0| 6e 74 09 63 6d 70 5a 4c | 54 0d 31 34 09 63 6f 6e |nt.cmpZL|T.14.con|
|00001cb0| 73 74 61 6e 74 09 63 6d | 70 5a 4c 45 0d 31 35 09 |stant.cm|pZLE.15.|
|00001cc0| 63 6f 6e 73 74 61 6e 74 | 09 63 6d 70 5a 47 54 0d |constant|.cmpZGT.|
|00001cd0| 0d 5c 20 68 65 72 65 27 | 73 20 61 20 74 61 62 6c |.\ here'|s a tabl|
|00001ce0| 65 20 74 6f 20 6d 61 70 | 20 6f 75 72 20 36 38 6b |e to map| our 68k|
|00001cf0| 20 63 6f 6d 70 61 72 69 | 73 6f 6e 20 63 6f 64 65 | compari|son code|
|00001d00| 73 20 74 6f 20 74 68 65 | 20 61 62 6f 76 65 20 50 |s to the| above P|
|00001d10| 50 43 20 6f 6e 65 73 3a | 0d 0d 50 50 43 3f 20 5b |PC ones:|..PPC? [|
|00001d20| 49 46 5d 0d 0d 20 20 63 | 72 65 61 74 65 78 09 63 |IF].. c|reatex.c|
|00001d30| 6f 6d 70 61 72 69 73 6f | 6e 5f 63 6f 64 65 73 0d |ompariso|n_codes.|
|00001d40| 09 30 09 09 63 78 2c 09 | 09 5c 20 30 0d 09 30 09 |.0..cx,.|.\ 0..0.|
|00001d50| 09 63 78 2c 09 09 5c 20 | 31 0d 09 63 6d 70 48 49 |.cx,..\ |1..cmpHI|
|00001d60| 09 63 78 2c 09 09 5c 20 | 32 0d 09 63 6d 70 4c 53 |.cx,..\ |2..cmpLS|
|00001d70| 09 63 78 2c 09 09 5c 20 | 33 0d 09 63 6d 70 48 53 |.cx,..\ |3..cmpHS|
|00001d80| 09 63 78 2c 09 09 5c 20 | 34 0d 09 63 6d 70 4c 4f |.cx,..\ |4..cmpLO|
|00001d90| 09 63 78 2c 09 09 5c 20 | 35 0d 09 63 6d 70 4e 45 |.cx,..\ |5..cmpNE|
|00001da0| 09 63 78 2c 09 09 5c 20 | 36 0d 09 63 6d 70 45 51 |.cx,..\ |6..cmpEQ|
|00001db0| 09 63 78 2c 09 09 5c 20 | 37 0d 09 30 09 09 63 78 |.cx,..\ |7..0..cx|
|00001dc0| 2c 09 09 5c 20 38 0d 09 | 30 09 09 63 78 2c 09 09 |,..\ 8..|0..cx,..|
|00001dd0| 5c 20 39 0d 09 30 09 09 | 63 78 2c 09 09 5c 20 41 |\ 9..0..|cx,..\ A|
|00001de0| 0d 09 30 09 09 63 78 2c | 09 09 5c 20 42 0d 09 63 |..0..cx,|..\ B..c|
|00001df0| 6d 70 47 45 09 63 78 2c | 09 09 5c 20 43 0d 09 63 |mpGE.cx,|..\ C..c|
|00001e00| 6d 70 4c 54 09 63 78 2c | 09 09 5c 20 44 0d 09 63 |mpLT.cx,|..\ D..c|
|00001e10| 6d 70 47 54 09 63 78 2c | 09 09 5c 20 45 0d 09 63 |mpGT.cx,|..\ E..c|
|00001e20| 6d 70 4c 45 09 63 78 2c | 09 09 5c 20 46 0d 0d 64 |mpLE.cx,|..\ F..d|
|00001e30| 65 63 69 6d 61 6c 78 0d | 0d 5b 45 4c 53 45 5d 0d |ecimalx.|.[ELSE].|
|00001e40| 0d 20 20 63 72 65 61 74 | 65 20 63 6f 6d 70 61 72 |. creat|e compar|
|00001e50| 69 73 6f 6e 5f 63 6f 64 | 65 73 0d 0d 09 30 09 09 |ison_cod|es...0..|
|00001e60| 63 2c 09 09 5c 20 30 0d | 09 30 09 09 63 2c 09 09 |c,..\ 0.|.0..c,..|
|00001e70| 5c 20 31 0d 09 63 6d 70 | 48 49 09 63 2c 09 09 5c |\ 1..cmp|HI.c,..\|
|00001e80| 20 32 0d 09 63 6d 70 4c | 53 09 63 2c 09 09 5c 20 | 2..cmpL|S.c,..\ |
|00001e90| 33 0d 09 63 6d 70 48 53 | 09 63 2c 09 09 5c 20 34 |3..cmpHS|.c,..\ 4|
|00001ea0| 0d 09 63 6d 70 4c 4f 09 | 63 2c 09 09 5c 20 35 0d |..cmpLO.|c,..\ 5.|
|00001eb0| 09 63 6d 70 4e 45 09 63 | 2c 09 09 5c 20 36 0d 09 |.cmpNE.c|,..\ 6..|
|00001ec0| 63 6d 70 45 51 09 63 2c | 09 09 5c 20 37 0d 09 30 |cmpEQ.c,|..\ 7..0|
|00001ed0| 09 09 63 2c 09 09 5c 20 | 38 0d 09 30 09 09 63 2c |..c,..\ |8..0..c,|
|00001ee0| 09 09 5c 20 39 0d 09 30 | 09 09 63 2c 09 09 5c 20 |..\ 9..0|..c,..\ |
|00001ef0| 41 0d 09 30 09 09 63 2c | 09 09 5c 20 42 0d 09 63 |A..0..c,|..\ B..c|
|00001f00| 6d 70 47 45 09 63 2c 09 | 09 5c 20 43 0d 09 63 6d |mpGE.c,.|.\ C..cm|
|00001f10| 70 4c 54 09 63 2c 09 09 | 5c 20 44 0d 09 63 6d 70 |pLT.c,..|\ D..cmp|
|00001f20| 47 54 09 63 2c 09 09 5c | 20 45 0d 09 63 6d 70 4c |GT.c,..\| E..cmpL|
|00001f30| 45 09 63 2c 09 09 5c 20 | 46 0d 0d 64 65 63 69 6d |E.c,..\ |F..decim|
|00001f40| 61 6c 0d 0d 5b 54 48 45 | 4e 5d 0d 0d 30 09 76 61 |al..[THE|N]..0.va|
|00001f50| 6c 75 65 09 09 4f 50 45 | 52 41 54 49 4f 4e 0d 30 |lue..OPE|RATION.0|
|00001f60| 09 76 61 6c 75 65 09 09 | 53 55 42 4f 50 45 52 41 |.value..|SUBOPERA|
|00001f70| 54 49 4f 4e 0d 0d 5c 20 | 53 6f 6d 65 20 74 79 70 |TION..\ |Some typ|
|00001f80| 65 73 20 6f 66 20 69 6e | 73 74 72 75 63 74 69 6f |es of in|structio|
|00001f90| 6e 20 6e 65 65 64 20 73 | 70 65 63 69 61 6c 20 74 |n need s|pecial t|
|00001fa0| 72 65 61 74 6d 65 6e 74 | 20 2d 20 65 2e 67 2e 20 |reatment| - e.g. |
|00001fb0| 41 4e 44 20 65 74 63 2e | 20 75 73 65 20 74 68 65 |AND etc.| use the|
|00001fc0| 0d 5c 20 72 41 20 66 69 | 65 6c 64 20 66 6f 72 20 |.\ rA fi|eld for |
|00001fd0| 74 68 65 20 64 65 73 74 | 69 6e 61 74 69 6f 6e 2e |the dest|ination.|
|00001fe0| 20 20 53 6f 20 77 65 20 | 64 65 66 69 6e 65 20 73 | So we |define s|
|00001ff0| 6f 6d 65 20 74 79 70 65 | 73 3a 0d 0d 65 6e 75 6d |ome type|s:..enum|
|00002000| 20 7b 09 6e 6f 54 79 70 | 65 20 20 6c 6f 61 64 53 | {.noTyp|e loadS|
|00002010| 74 6f 72 65 54 79 70 65 | 20 20 61 72 69 74 68 54 |toreType| arithT|
|00002020| 79 70 65 20 20 6c 6f 67 | 69 63 61 6c 54 79 70 65 |ype log|icalType|
|00002030| 20 20 63 6d 70 54 79 70 | 65 20 20 62 72 61 6e 63 | cmpTyp|e branc|
|00002040| 68 54 79 70 65 20 20 73 | 68 69 66 74 54 79 70 65 |hType s|hiftType|
|00002050| 20 76 65 63 54 79 70 65 | 20 20 7d 0d 0d 0d 0d 5c | vecType| }....\|
|00002060| 09 09 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |..======|========|
|00002070| 3d 3d 3d 09 55 54 49 4c | 49 54 59 20 57 4f 52 44 |===.UTIL|ITY WORD|
|00002080| 53 09 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |S.======|========|
|00002090| 3d 3d 3d 3d 0d 0d 3a 20 | 4d 4f 4e 41 44 49 43 3f |====..: |MONADIC?|
|000020a0| 09 5c 20 28 20 6f 70 63 | 6f 64 65 20 2d 2d 20 6f |.\ ( opc|ode -- o|
|000020b0| 70 63 6f 64 65 20 62 20 | 29 0d 09 6f 74 4e 65 67 |pcode b |)..otNeg|
|000020c0| 20 20 6f 74 4e 6f 74 09 | 77 69 74 68 69 6e 3f 20 | otNot.|within? |
|000020d0| 20 49 46 20 20 74 72 75 | 65 20 20 45 58 49 54 20 | IF tru|e EXIT |
|000020e0| 20 54 48 45 4e 0d 09 6f | 74 46 50 6d 6f 6e 20 6f | THEN..o|tFPmon o|
|000020f0| 74 46 50 65 6e 64 09 77 | 69 74 68 69 6e 3f 0d 3b |tFPend.w|ithin?.;|
|00002100| 0d 0d 3a 20 4d 45 4d 5f | 52 45 46 45 52 45 4e 43 |..: MEM_|REFERENC|
|00002110| 49 4e 47 3f 09 5c 20 28 | 20 6f 70 63 6f 64 65 20 |ING?.\ (| opcode |
|00002120| 2d 2d 20 62 20 29 0d 09 | 24 20 46 46 20 61 6e 64 |-- b )..|$ FF and|
|00002130| 0d 09 53 45 4c 45 43 54 | 5b 09 6f 74 46 65 74 63 |..SELECT|[.otFetc|
|00002140| 68 09 09 5d 2c 0d 09 09 | 20 20 5b 20 6f 74 53 74 |h..],...| [ otSt|
|00002150| 6f 72 65 09 09 5d 3d 3e | 09 09 74 72 75 65 0d 09 |ore..]=>|..true..|
|00002160| 09 09 09 20 20 44 45 46 | 41 55 4c 54 3d 3e 09 09 |... DEF|AULT=>..|
|00002170| 64 72 6f 70 20 66 61 6c | 73 65 0d 09 5d 53 45 4c |drop fal|se..]SEL|
|00002180| 45 43 54 0d 3b 0d 09 0d | 0d 50 50 43 3f 0d 5b 49 |ECT.;...|.PPC?.[I|
|00002190| 46 5d 0d 3a 20 64 61 73 | 6d 20 20 3b 09 09 09 5c |F].: das|m ;...\|
|000021a0| 20 63 61 6e 27 74 20 64 | 69 73 61 73 73 65 6d 62 | can't d|isassemb|
|000021b0| 6c 65 20 69 6e 20 6e 61 | 74 69 76 65 20 6d 6f 64 |le in na|tive mod|
|000021c0| 65 20 79 65 74 21 0d 3a | 20 7a 20 20 3b 0d 0d 5b |e yet!.:| z ;..[|
|000021d0| 45 4c 53 45 5d 0d 0d 66 | 6f 72 77 61 72 64 20 64 |ELSE]..f|orward d|
|000021e0| 61 73 6d 09 09 5c 20 64 | 69 73 61 73 73 65 6d 62 |asm..\ d|isassemb|
|000021f0| 6c 65 73 20 77 68 61 74 | 20 77 65 27 76 65 20 64 |les what| we've d|
|00002200| 6f 6e 65 20 73 6f 20 66 | 61 72 0d 66 6f 72 77 61 |one so f|ar.forwa|
|00002210| 72 64 20 64 63 75 72 72 | 09 09 5c 20 64 69 73 61 |rd dcurr|..\ disa|
|00002220| 73 73 65 6d 62 6c 65 73 | 20 74 68 65 20 63 75 72 |ssembles| the cur|
|00002230| 72 65 6e 74 20 64 65 66 | 6e 20 28 65 76 65 6e 20 |rent def|n (even |
|00002240| 69 66 20 6e 6f 74 20 66 | 69 6e 69 73 68 65 64 29 |if not f|inished)|
|00002250| 0d 66 6f 72 77 61 72 64 | 20 5a 09 09 09 5c 20 65 |.forward| Z...\ e|
|00002260| 6e 64 73 20 70 70 63 20 | 63 6f 6d 70 69 6c 61 74 |nds ppc |compilat|
|00002270| 69 6f 6e 20 61 6e 64 20 | 64 69 73 61 73 73 65 6d |ion and |disassem|
|00002280| 62 6c 65 73 2e 0d 0d 5b | 54 48 45 4e 5d 0d 0d 0d |bles...[|THEN]...|
|00002290| 5c 20 47 65 74 49 6d 6d | 65 64 69 61 74 65 4f 70 |\ GetImm|ediateOp|
|000022a0| 20 64 6f 65 73 20 74 68 | 65 20 73 61 6d 65 20 77 | does th|e same w|
|000022b0| 68 65 6e 20 77 65 27 72 | 65 20 67 6f 69 6e 67 20 |hen we'r|e going |
|000022c0| 74 6f 20 65 78 65 63 75 | 74 65 20 74 68 65 20 6f |to execu|te the o|
|000022d0| 70 65 72 61 74 69 6f 6e | 0d 5c 20 6e 6f 77 2c 20 |peration|.\ now, |
|000022e0| 72 65 74 75 72 6e 69 6e | 67 20 74 68 65 20 78 74 |returnin|g the xt|
|000022f0| 20 6f 66 20 74 68 65 20 | 77 6f 72 64 20 74 6f 20 | of the |word to |
|00002300| 65 78 65 63 75 74 65 2e | 0d 0d 3a 20 47 45 54 49 |execute.|..: GETI|
|00002310| 4d 4d 45 44 49 41 54 45 | 4f 50 20 20 7b 20 6f 70 |MMEDIATE|OP { op|
|00002320| 54 79 70 65 20 73 75 62 | 74 79 70 65 20 2d 2d 20 |Type sub|type -- |
|00002330| 78 74 20 7d 0d 09 6f 70 | 54 79 70 65 0d 09 53 45 |xt }..op|Type..SE|
|00002340| 4c 45 43 54 5b 09 6f 74 | 41 64 64 09 5d 3d 3e 09 |LECT[.ot|Add.]=>.|
|00002350| 09 5b 27 5d 20 2b 0d 09 | 09 20 20 5b 09 6f 74 53 |.['] +..|. [.otS|
|00002360| 75 62 09 5d 3d 3e 09 09 | 5b 27 5d 20 2d 0d 09 09 |ub.]=>..|['] -...|
|00002370| 20 20 5b 09 6f 74 41 4e | 44 09 5d 3d 3e 09 09 5b | [.otAN|D.]=>..[|
|00002380| 27 5d 20 61 6e 64 0d 09 | 09 20 20 5b 09 6f 74 4f |'] and..|. [.otO|
|00002390| 52 09 5d 3d 3e 09 09 5b | 27 5d 20 6f 72 0d 09 09 |R.]=>..[|'] or...|
|000023a0| 20 20 5b 09 6f 74 58 4f | 52 09 5d 3d 3e 09 09 5b | [.otXO|R.]=>..[|
|000023b0| 27 5d 20 78 6f 72 0d 09 | 09 20 20 5b 09 6f 74 4d |'] xor..|. [.otM|
|000023c0| 55 4c 09 5d 3d 3e 09 09 | 5b 27 5d 20 2a 0d 09 09 |UL.]=>..|['] *...|
|000023d0| 20 20 5b 09 6f 74 44 49 | 56 09 5d 3d 3e 09 09 5b | [.otDI|V.]=>..[|
|000023e0| 27 5d 20 2f 0d 09 09 20 | 20 0d 09 09 20 20 5b 09 |'] /... | ... [.|
|000023f0| 6f 74 4e 45 47 09 5d 3d | 3e 09 09 5b 27 5d 20 6e |otNEG.]=|>..['] n|
|00002400| 65 67 61 74 65 0d 09 09 | 20 20 5b 09 6f 74 4e 4f |egate...| [.otNO|
|00002410| 54 09 5d 3d 3e 09 09 5b | 27 5d 20 6e 6f 74 0d 0d |T.]=>..[|'] not..|
|00002420| 09 09 20 20 5b 09 6f 74 | 43 4d 50 09 5d 3d 3e 0d |.. [.ot|CMP.]=>.|
|00002430| 09 09 20 20 09 09 73 75 | 62 74 79 70 65 0d 09 09 |.. ..su|btype...|
|00002440| 20 20 09 09 43 41 53 45 | 5b 20 63 6d 70 4e 45 09 | ..CASE|[ cmpNE.|
|00002450| 5d 3d 3e 09 09 5b 27 5d | 20 3c 3e 0d 09 09 09 09 |]=>..[']| <>.....|
|00002460| 09 5b 20 63 6d 70 45 51 | 09 5d 3d 3e 09 09 5b 27 |.[ cmpEQ|.]=>..['|
|00002470| 5d 09 3d 0d 09 09 09 09 | 09 5b 20 63 6d 70 47 45 |].=.....|.[ cmpGE|
|00002480| 09 5d 3d 3e 09 09 5b 27 | 5d 20 3e 3d 0d 09 09 09 |.]=>..['|] >=....|
|00002490| 09 09 5b 20 63 6d 70 4c | 54 09 5d 3d 3e 09 09 5b |..[ cmpL|T.]=>..[|
|000024a0| 27 5d 20 3c 0d 09 09 09 | 09 09 5b 20 63 6d 70 4c |'] <....|..[ cmpL|
|000024b0| 45 09 5d 3d 3e 09 09 5b | 27 5d 20 3c 3d 0d 09 09 |E.]=>..[|'] <=...|
|000024c0| 09 09 09 5b 20 63 6d 70 | 47 54 09 5d 3d 3e 09 09 |...[ cmp|GT.]=>..|
|000024d0| 5b 27 5d 20 3e 0d 09 09 | 09 09 09 5b 20 63 6d 70 |['] >...|...[ cmp|
|000024e0| 5a 4e 45 20 5d 3d 3e 09 | 5b 27 5d 20 30 3c 3e 0d |ZNE ]=>.|['] 0<>.|
|000024f0| 09 09 09 09 09 5b 20 63 | 6d 70 5a 45 51 20 5d 3d |.....[ c|mpZEQ ]=|
|00002500| 3e 09 5b 27 5d 20 30 3d | 0d 09 09 09 09 09 5b 20 |>.['] 0=|......[ |
|00002510| 63 6d 70 5a 47 45 20 5d | 3d 3e 09 5b 27 5d 20 30 |cmpZGE ]|=>.['] 0|
|00002520| 3e 3d 0d 09 09 09 09 09 | 5b 20 63 6d 70 5a 4c 54 |>=......|[ cmpZLT|
|00002530| 20 5d 3d 3e 09 5b 27 5d | 20 30 3c 0d 09 09 09 09 | ]=>.[']| 0<.....|
|00002540| 09 5b 20 63 6d 70 5a 4c | 45 20 5d 3d 3e 09 5b 27 |.[ cmpZL|E ]=>.['|
|00002550| 5d 20 30 3c 3d 0d 09 09 | 09 09 09 5b 20 63 6d 70 |] 0<=...|...[ cmp|
|00002560| 5a 47 54 20 5d 3d 3e 09 | 5b 27 5d 20 30 3e 0d 0d |ZGT ]=>.|['] 0>..|
|00002570| 09 09 09 09 44 45 46 41 | 55 4c 54 3d 3e 09 63 72 |....DEFA|ULT=>.cr|
|00002580| 20 2e 68 20 2e 22 20 20 | 75 6e 64 65 66 20 6f 74 | .h ." |undef ot|
|00002590| 43 4d 50 20 73 75 62 74 | 79 70 65 20 69 6e 20 67 |CMP subt|ype in g|
|000025a0| 65 74 49 6d 6d 65 64 69 | 61 74 65 4f 70 22 20 31 |etImmedi|ateOp" 1|
|000025b0| 20 64 69 65 0d 09 09 09 | 09 5d 43 41 53 45 0d 0d | die....|.]CASE..|
|000025c0| 09 09 20 20 5b 09 6f 74 | 55 43 4d 50 09 5d 3d 3e |.. [.ot|UCMP.]=>|
|000025d0| 0d 09 09 20 20 09 09 73 | 75 62 74 79 70 65 0d 09 |... ..s|ubtype..|
|000025e0| 09 20 20 09 09 43 41 53 | 45 5b 20 63 6d 70 48 53 |. ..CAS|E[ cmpHS|
|000025f0| 09 5d 3d 3e 09 09 5b 27 | 5d 20 75 3e 3d 0d 09 09 |.]=>..['|] u>=...|
|00002600| 09 09 09 5b 20 63 6d 70 | 4c 4f 09 5d 3d 3e 09 09 |...[ cmp|LO.]=>..|
|00002610| 5b 27 5d 20 75 3c 0d 09 | 09 09 09 09 5b 20 63 6d |['] u<..|....[ cm|
|00002620| 70 4c 53 09 5d 3d 3e 09 | 09 5b 27 5d 20 75 3c 3d |pLS.]=>.|.['] u<=|
|00002630| 0d 09 09 09 09 09 5b 20 | 63 6d 70 48 49 09 5d 3d |......[ |cmpHI.]=|
|00002640| 3e 09 09 5b 27 5d 20 75 | 3e 0d 09 09 09 09 44 45 |>..['] u|>.....DE|
|00002650| 46 41 55 4c 54 3d 3e 09 | 63 72 20 2e 68 20 2e 22 |FAULT=>.|cr .h ."|
|00002660| 20 20 75 6e 64 65 66 20 | 6f 74 55 43 4d 50 20 73 | undef |otUCMP s|
|00002670| 75 62 74 79 70 65 20 69 | 6e 20 67 65 74 49 6d 6d |ubtype i|n getImm|
|00002680| 65 64 69 61 74 65 4f 70 | 22 20 31 20 64 69 65 0d |ediateOp|" 1 die.|
|00002690| 09 09 09 09 5d 43 41 53 | 45 0d 0d 09 09 20 20 5b |....]CAS|E.... [|
|000026a0| 09 6f 74 53 68 69 66 74 | 09 5d 3d 3e 0d 09 09 20 |.otShift|.]=>... |
|000026b0| 20 09 09 73 75 62 74 79 | 70 65 0d 09 09 20 20 09 | ..subty|pe... .|
|000026c0| 09 43 41 53 45 5b 20 30 | 09 5d 3d 3e 09 09 5b 27 |.CASE[ 0|.]=>..['|
|000026d0| 5d 20 3c 3c 0d 09 09 09 | 09 09 5b 20 31 09 5d 3d |] <<....|..[ 1.]=|
|000026e0| 3e 09 09 5b 27 5d 20 3e | 3e 0d 09 09 09 09 09 5b |>..['] >|>......[|
|000026f0| 20 33 20 5d 3d 3e 09 09 | 5b 27 5d 20 61 3e 3e 0d | 3 ]=>..|['] a>>.|
|00002700| 09 09 09 09 44 45 46 41 | 55 4c 54 3d 3e 09 63 72 |....DEFA|ULT=>.cr|
|00002710| 20 2e 68 20 2e 22 20 20 | 75 6e 64 65 66 20 6f 74 | .h ." |undef ot|
|00002720| 53 68 69 66 74 20 73 75 | 62 74 79 70 65 20 69 6e |Shift su|btype in|
|00002730| 20 67 65 74 49 6d 6d 65 | 64 69 61 74 65 4f 70 22 | getImme|diateOp"|
|00002740| 20 31 20 64 69 65 0d 09 | 09 09 09 5d 43 41 53 45 | 1 die..|...]CASE|
|00002750| 0d 0d 09 09 44 45 46 41 | 55 4c 54 3d 3e 09 09 63 |....DEFA|ULT=>..c|
|00002760| 72 20 2e 68 20 2e 22 20 | 20 75 6e 64 65 66 20 6f |r .h ." | undef o|
|00002770| 70 20 70 61 73 73 65 64 | 20 74 6f 20 67 65 74 49 |p passed| to getI|
|00002780| 6d 6d 65 64 69 61 74 65 | 4f 70 22 20 31 20 64 69 |mmediate|Op" 1 di|
|00002790| 65 0d 09 5d 53 45 4c 45 | 43 54 0d 3b 0d 0d 50 50 |e..]SELE|CT.;..PP|
|000027a0| 43 3f 20 6e 6f 74 0d 5b | 49 46 5d 09 09 5c 20 77 |C? not.[|IF]..\ w|
|000027b0| 65 20 70 75 74 20 74 68 | 69 73 20 69 6e 20 70 6e |e put th|is in pn|
|000027c0| 75 63 33 20 69 6e 20 74 | 61 72 67 65 74 20 6d 6f |uc3 in t|arget mo|
|000027d0| 64 65 0d 0d 5c 20 31 36 | 62 69 74 73 3f 20 28 20 |de..\ 16|bits? ( |
|000027e0| 6e 20 73 69 67 6e 65 64 | 3f 20 2d 2d 20 6e 20 62 |n signed|? -- n b|
|000027f0| 20 29 0d 5c 20 20 72 65 | 74 75 72 6e 73 20 74 72 | ).\ re|turns tr|
|00002800| 75 65 20 69 66 20 6e 20 | 77 69 6c 6c 20 66 69 74 |ue if n |will fit|
|00002810| 20 69 6e 20 31 36 20 62 | 69 74 73 20 28 73 69 67 | in 16 b|its (sig|
|00002820| 6e 65 64 20 6f 72 20 75 | 6e 73 69 67 6e 65 64 20 |ned or u|nsigned |
|00002830| 61 73 20 72 65 71 75 65 | 73 74 65 64 29 2e 0d 0d |as reque|sted)...|
|00002840| 3a 20 31 36 42 49 54 53 | 3f 09 5c 20 28 20 6e 20 |: 16BITS|?.\ ( n |
|00002850| 73 69 67 6e 65 64 3f 20 | 2d 2d 20 6e 20 62 20 29 |signed? |-- n b )|
|00002860| 0d 09 49 46 09 2d 33 32 | 37 36 38 20 33 32 37 36 |..IF.-32|768 3276|
|00002870| 37 20 20 77 69 74 68 69 | 6e 3f 0d 09 45 4c 53 45 |7 withi|n?..ELSE|
|00002880| 0d 09 09 64 75 70 20 31 | 36 20 3e 3e 20 30 3d 0d |...dup 1|6 >> 0=.|
|00002890| 09 54 48 45 4e 0d 3b 0d | 0d 5b 54 48 45 4e 5d 0d |.THEN.;.|.[THEN].|
|000028a0| 0d 3a 20 53 49 47 4e 45 | 44 3f 09 5c 20 28 20 6f |.: SIGNE|D?.\ ( o|
|000028b0| 70 65 72 61 74 69 6f 6e | 20 2d 20 62 20 29 0d 09 |peration| - b )..|
|000028c0| 09 09 5c 20 52 65 74 75 | 72 6e 73 20 74 72 75 65 |..\ Retu|rns true|
|000028d0| 20 69 66 20 74 68 69 73 | 20 69 73 20 61 20 73 69 | if this| is a si|
|000028e0| 67 6e 65 64 20 6f 70 20 | 2d 20 61 73 73 75 6d 65 |gned op |- assume|
|000028f0| 64 20 74 6f 20 62 65 20 | 74 68 65 0d 09 09 09 5c |d to be |the....\|
|00002900| 20 20 64 65 66 61 75 6c | 74 2e 20 20 57 65 20 6a | defaul|t. We j|
|00002910| 75 73 74 20 72 65 74 75 | 72 6e 20 66 61 6c 73 65 |ust retu|rn false|
|00002920| 20 66 6f 72 20 74 68 65 | 20 73 70 65 63 69 66 69 | for the| specifi|
|00002930| 63 20 75 6e 73 69 67 6e | 65 64 0d 09 09 09 5c 20 |c unsign|ed....\ |
|00002940| 20 6f 70 73 2c 20 61 6e | 64 20 74 72 75 65 20 66 | ops, an|d true f|
|00002950| 6f 72 20 65 76 65 72 79 | 74 68 69 6e 67 20 65 6c |or every|thing el|
|00002960| 73 65 2e 0d 0d 09 53 45 | 4c 45 43 54 5b 09 6f 74 |se....SE|LECT[.ot|
|00002970| 55 44 49 56 09 5d 2c 0d | 09 09 20 20 5b 09 6f 74 |UDIV.],.|.. [.ot|
|00002980| 41 4e 44 09 5d 2c 0d 09 | 09 20 20 5b 09 6f 74 4f |AND.],..|. [.otO|
|00002990| 52 09 5d 2c 0d 09 09 20 | 20 5b 09 6f 74 58 4f 52 |R.],... | [.otXOR|
|000029a0| 09 5d 2c 0d 09 09 20 20 | 5b 09 6f 74 55 43 4d 50 |.],... |[.otUCMP|
|000029b0| 09 5d 3d 3e 09 09 66 61 | 6c 73 65 0d 09 09 44 45 |.]=>..fa|lse...DE|
|000029c0| 46 41 55 4c 54 3d 3e 09 | 09 09 64 72 6f 70 20 20 |FAULT=>.|..drop |
|000029d0| 74 72 75 65 0d 09 5d 53 | 45 4c 45 43 54 0d 3b 0d |true..]S|ELECT.;.|
|000029e0| 0d 0d 3a 20 52 45 56 45 | 52 53 45 5f 43 4f 4d 50 |..: REVE|RSE_COMP|
|000029f0| 41 52 49 53 4f 4e 09 5c | 20 63 61 6c 6c 65 64 20 |ARISON.\| called |
|00002a00| 69 66 20 77 65 20 73 77 | 61 70 20 6f 70 65 72 61 |if we sw|ap opera|
|00002a10| 6e 64 73 20 6f 66 20 61 | 20 63 6f 6d 70 61 72 65 |nds of a| compare|
|00002a20| 2e 20 20 41 64 6a 75 73 | 74 20 0d 09 09 09 09 09 |. Adjus|t ......|
|00002a30| 09 5c 20 20 73 75 62 4f | 70 65 72 61 74 69 6f 6e |.\ subO|peration|
|00002a40| 20 61 70 70 72 6f 70 72 | 69 61 74 65 6c 79 2e 0d | appropr|iately..|
|00002a50| 0d 09 73 75 62 4f 70 65 | 72 61 74 69 6f 6e 20 24 |..subOpe|ration $|
|00002a60| 20 32 34 20 61 6e 64 20 | 20 3f 45 58 49 54 09 09 | 24 and | ?EXIT..|
|00002a70| 5c 20 6f 75 74 20 69 66 | 20 6d 6f 6e 61 64 69 63 |\ out if| monadic|
|00002a80| 20 6f 72 20 45 51 20 6f | 72 20 4e 45 0d 09 24 20 | or EQ o|r NE..$ |
|00002a90| 31 30 20 20 78 6f 72 3e | 20 73 75 62 4f 70 65 72 |10 xor>| subOper|
|00002aa0| 61 74 69 6f 6e 20 20 3b | 0d 0d 0d 5c 20 54 68 69 |ation ;|...\ Thi|
|00002ab0| 73 20 6d 75 73 74 20 63 | 6f 6d 65 20 62 65 66 6f |s must c|ome befo|
|00002ac0| 72 65 20 77 65 20 72 65 | 64 65 66 69 6e 65 20 40 |re we re|define @|
|00002ad0| 41 42 53 20 62 65 6c 6f | 77 21 0d 0d 50 50 43 3f |ABS belo|w!..PPC?|
|00002ae0| 20 6e 6f 74 0d 5b 49 46 | 5d 0d 66 72 6f 6d 20 70 | not.[IF|].from p|
|00002af0| 61 73 6d 4d 6f 64 20 69 | 6d 70 6f 72 74 7b 09 3a |asmMod i|mport{.:|
|00002b00| 50 50 43 5f 63 6f 64 65 | 20 20 3b 50 50 43 5f 63 |PPC_code| ;PPC_c|
|00002b10| 6f 64 65 0d 09 09 09 09 | 09 09 64 69 73 61 73 6d |ode.....|..disasm|
|00002b20| 20 20 64 69 73 61 73 6d | 5f 77 6f 72 64 20 20 64 | disasm|_word d|
|00002b30| 69 73 61 73 6d 5f 78 74 | 0d 09 09 09 09 09 09 64 |isasm_xt|.......d|
|00002b40| 69 73 61 73 6d 5f 72 6e | 67 20 20 64 69 73 61 73 |isasm_rn|g disas|
|00002b50| 6d 5f 63 6e 74 20 20 64 | 69 73 61 73 6d 5f 6f 6e |m_cnt d|isasm_on|
|00002b60| 65 0d 09 09 09 09 09 09 | 73 65 74 5f 64 69 73 61 |e.......|set_disa|
|00002b70| 73 6d 5f 63 61 6c 6c 5f | 72 61 6e 67 65 20 20 7d |sm_call_|range }|
|00002b80| 0d 0d 63 6f 6d 70 69 6c | 65 3a 20 70 61 73 6d 4d |..compil|e: pasmM|
|00002b90| 6f 64 0d 0d 0d 5c 20 57 | 68 69 6c 65 20 73 74 69 |od...\ W|hile sti|
|00002ba0| 6c 6c 20 69 6e 20 36 38 | 6b 2d 6c 61 6e 64 2c 20 |ll in 68|k-land, |
|00002bb0| 77 65 20 6e 65 65 64 20 | 61 20 50 50 43 2d 73 74 |we need |a PPC-st|
|00002bc0| 79 6c 65 20 72 65 6c 6f | 63 21 20 61 6e 64 20 40 |yle relo|c! and @|
|00002bd0| 61 62 73 2e 20 20 54 68 | 65 20 70 72 6f 70 65 72 |abs. Th|e proper|
|00002be0| 0d 5c 20 20 50 50 43 20 | 76 65 72 73 69 6f 6e 73 |.\ PPC |versions|
|00002bf0| 20 77 69 6c 6c 20 62 65 | 20 63 6f 6d 70 69 6c 65 | will be| compile|
|00002c00| 64 20 69 6e 20 70 6e 75 | 63 33 20 61 6e 64 20 73 |d in pnu|c3 and s|
|00002c10| 65 74 75 70 20 72 65 73 | 70 65 63 74 69 76 65 6c |etup res|pectivel|
|00002c20| 79 2e 20 20 4e 6f 74 65 | 2c 0d 5c 20 20 61 6e 79 |y. Note|,.\ any|
|00002c30| 20 63 68 61 6e 67 65 73 | 20 6d 75 73 74 20 6f 66 | changes| must of|
|00002c40| 20 63 6f 75 72 73 65 20 | 62 65 20 6d 61 64 65 20 | course |be made |
|00002c50| 69 6e 20 62 6f 74 68 20 | 70 6c 61 63 65 73 2e 0d |in both |places..|
|00002c60| 0d 3a 20 52 45 4c 4f 43 | 21 20 20 7b 20 74 68 65 |.: RELOC|! { the|
|00002c70| 41 64 64 72 20 64 65 73 | 74 20 2d 2d 20 7d 0d 09 |Addr des|t -- }..|
|00002c80| 74 68 65 41 64 64 72 20 | 61 64 64 72 3e 53 26 44 |theAddr |addr>S&D|
|00002c90| 0d 09 24 20 66 66 66 66 | 66 66 20 61 6e 64 20 20 |..$ ffff|ff and |
|00002ca0| 73 77 61 70 20 20 32 34 | 20 3c 3c 20 20 6f 72 0d |swap 24| << or.|
|00002cb0| 09 64 65 73 74 20 21 0d | 3b 0d 0d 0d 3a 20 72 65 |.dest !.|;...: re|
|00002cc0| 6c 6f 63 2c 09 09 44 50 | 09 72 65 6c 6f 63 21 20 |loc,..DP|.reloc! |
|00002cd0| 20 34 20 2b 2b 3e 20 44 | 50 20 20 20 3b 0d 3a 20 | 4 ++> D|P ;.: |
|00002ce0| 72 65 6c 6f 63 43 6f 64 | 65 2c 09 43 44 50 20 72 |relocCod|e,.CDP r|
|00002cf0| 65 6c 6f 63 21 20 20 34 | 20 2b 2b 3e 20 43 44 50 |eloc! 4| ++> CDP|
|00002d00| 20 20 3b 0d 3a 20 64 69 | 73 70 6c 43 6f 64 65 2c | ;.: di|splCode,|
|00002d10| 09 43 44 50 20 64 69 73 | 70 6c 21 09 34 20 2b 2b |.CDP dis|pl!.4 ++|
|00002d20| 3e 20 43 44 50 20 20 3b | 0d 0d 0d 5c 20 49 6e 20 |> CDP ;|...\ In |
|00002d30| 74 68 65 20 74 61 72 67 | 65 74 20 63 6f 6d 70 69 |the targ|et compi|
|00002d40| 6c 61 74 69 6f 6e 2c 20 | 77 65 20 6f 6e 6c 79 20 |lation, |we only |
|00002d50| 68 61 76 65 20 34 20 73 | 65 67 6d 65 6e 74 73 2e |have 4 s|egments.|
|00002d60| 0d 0d 3a 20 40 41 42 53 | 20 20 7b 20 61 64 64 72 |..: @ABS| { addr|
|00002d70| 20 5c 20 72 65 6c 6f 63 | 41 64 64 72 20 73 65 67 | \ reloc|Addr seg|
|00002d80| 23 20 64 69 73 70 6c 20 | 2d 2d 20 61 62 73 41 64 |# displ |-- absAd|
|00002d90| 64 72 20 7d 0d 09 61 64 | 64 72 20 40 20 20 2d 3e |dr }..ad|dr @ ->|
|00002da0| 20 72 65 6c 6f 63 41 64 | 64 72 0d 09 72 65 6c 6f | relocAd|dr..relo|
|00002db0| 63 41 64 64 72 20 20 24 | 20 66 66 66 66 66 66 20 |cAddr $| ffffff |
|00002dc0| 61 6e 64 20 20 2d 3e 20 | 64 69 73 70 6c 0d 09 72 |and -> |displ..r|
|00002dd0| 65 6c 6f 63 41 64 64 72 | 20 20 32 34 20 3e 3e 20 |elocAddr| 24 >> |
|00002de0| 20 2d 3e 20 73 65 67 23 | 0d 09 73 65 67 23 0d 09 | -> seg#|..seg#..|
|00002df0| 53 45 4c 45 43 54 5b 09 | 38 09 5d 3d 3e 09 09 63 |SELECT[.|8.]=>..c|
|00002e00| 6f 64 65 5f 73 74 61 72 | 74 0d 09 09 20 20 5b 09 |ode_star|t... [.|
|00002e10| 39 09 5d 3d 3e 09 09 64 | 61 74 61 5f 73 74 61 72 |9.]=>..d|ata_star|
|00002e20| 74 0d 09 09 20 20 5b 09 | 31 30 09 5d 3d 3e 09 09 |t... [.|10.]=>..|
|00002e30| 73 65 67 5f 63 6f 64 65 | 5f 73 74 61 72 74 0d 09 |seg_code|_start..|
|00002e40| 09 20 20 5b 09 31 31 09 | 5d 3d 3e 09 09 73 65 67 |. [.11.|]=>..seg|
|00002e50| 5f 64 61 74 61 5f 73 74 | 61 72 74 0d 09 44 45 46 |_data_st|art..DEF|
|00002e60| 41 55 4c 54 3d 3e 09 2e | 22 20 6e 6f 74 20 61 20 |AULT=>..|" not a |
|00002e70| 72 65 6c 6f 63 20 61 64 | 64 72 22 20 31 20 64 69 |reloc ad|dr" 1 di|
|00002e80| 65 0d 09 5d 53 45 4c 45 | 43 54 0d 09 64 69 73 70 |e..]SELE|CT..disp|
|00002e90| 6c 20 2b 0d 3b 0d 0d 0d | 3a 20 40 61 62 73 36 09 |l +.;...|: @abs6.|
|00002ea0| 09 40 61 62 73 20 20 3b | 09 09 09 5c 20 61 20 76 |.@abs ;|...\ a v|
|00002eb0| 61 72 69 61 6e 74 20 6e | 61 6d 65 20 77 65 20 63 |ariant n|ame we c|
|00002ec0| 61 6e 20 63 61 6c 6c 20 | 6c 61 74 65 72 20 77 68 |an call |later wh|
|00002ed0| 65 6e 20 40 61 62 73 0d | 09 09 09 09 09 09 09 5c |en @abs.|.......\|
|00002ee0| 20 20 68 61 73 20 62 65 | 65 6e 20 72 65 64 65 66 | has be|en redef|
|00002ef0| 69 6e 65 64 20 69 6e 20 | 74 68 65 20 50 50 43 20 |ined in |the PPC |
|00002f00| 69 6d 61 67 65 0d 0d 5b | 54 48 45 4e 5d 0d 0d 0d |image..[|THEN]...|
|00002f10| 65 6e 64 6c 6f 61 64 0d | 0d 0d 0d 0d 09 09 09 09 |endload.|........|
|00002f20| 09 09 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |..======|========|
|00002f30| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 0d 09 09 09 09 09 09 |========|=.......|
|00002f40| 54 45 43 48 4e 49 43 41 | 4c 20 44 4f 43 55 4d 45 |TECHNICA|L DOCUME|
|00002f50| 4e 54 41 54 49 4f 4e 0d | 09 09 09 09 09 09 3d 3d |NTATION.|......==|
|00002f60| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00002f70| 3d 3d 3d 3d 3d 0d 0d 48 | 65 72 65 20 77 65 20 64 |=====..H|ere we d|
|00002f80| 65 73 63 72 69 62 65 20 | 61 6c 6c 20 74 68 65 20 |escribe |all the |
|00002f90| 6e 75 74 73 20 61 6e 64 | 20 62 6f 6c 74 73 20 73 |nuts and| bolts s|
|00002fa0| 74 75 66 66 20 72 65 6c | 61 74 69 6e 67 20 74 6f |tuff rel|ating to|
|00002fb0| 20 50 50 43 20 63 6f 64 | 65 0d 67 65 6e 65 72 61 | PPC cod|e.genera|
|00002fc0| 74 69 6f 6e 2e 20 20 57 | 65 27 76 65 20 63 6f 6c |tion. W|e've col|
|00002fd0| 6c 65 63 74 65 64 20 74 | 6f 67 65 74 68 65 72 20 |lected t|ogether |
|00002fe0| 61 20 77 68 6f 6c 65 20 | 6c 6f 74 20 6f 66 20 63 |a whole |lot of c|
|00002ff0| 6f 6d 6d 65 6e 74 61 72 | 79 20 66 72 6f 6d 0d 61 |ommentar|y from.a|
|00003000| 6c 6c 20 6f 76 65 72 20 | 6f 75 72 20 73 6f 75 72 |ll over |our sour|
|00003010| 63 65 20 66 69 6c 65 73 | 20 2d 2d 20 69 74 20 73 |ce files| -- it s|
|00003020| 68 6f 75 6c 64 20 62 65 | 20 65 61 73 69 65 72 20 |hould be| easier |
|00003030| 74 6f 20 66 69 6e 64 20 | 74 68 69 6e 67 73 20 69 |to find |things i|
|00003040| 66 0d 74 68 65 79 27 72 | 65 20 61 6c 6c 20 69 6e |f.they'r|e all in|
|00003050| 20 6f 6e 65 20 70 6c 61 | 63 65 2c 20 61 6e 64 20 | one pla|ce, and |
|00003060| 77 65 20 63 61 6e 20 61 | 6c 73 6f 20 63 75 74 20 |we can a|lso cut |
|00003070| 61 6e 64 20 70 61 73 74 | 65 20 69 74 20 69 6e 74 |and past|e it int|
|00003080| 6f 20 74 68 65 0d 6d 61 | 6e 75 61 6c 2e 0d 0d 0d |o the.ma|nual....|
|00003090| 0d 54 68 65 20 67 65 6e | 65 72 61 6c 20 77 61 79 |.The gen|eral way|
|000030a0| 20 74 6f 20 67 65 6e 65 | 72 61 74 65 20 6f 70 74 | to gene|rate opt|
|000030b0| 69 6d 69 7a 65 64 20 63 | 6f 64 65 20 66 6f 72 20 |imized c|ode for |
|000030c0| 61 6e 20 61 72 63 68 69 | 74 65 63 74 75 72 65 20 |an archi|tecture |
|000030d0| 77 69 74 68 20 6e 0d 72 | 65 67 69 73 74 65 72 73 |with n.r|egisters|
|000030e0| 20 69 73 20 74 6f 20 61 | 6e 61 6c 79 73 65 20 65 | is to a|nalyse e|
|000030f0| 61 63 68 20 62 61 73 69 | 63 20 62 6c 6f 63 6b 20 |ach basi|c block |
|00003100| 61 6e 64 20 67 65 6e 65 | 72 61 74 65 20 61 20 64 |and gene|rate a d|
|00003110| 69 72 65 63 74 65 64 20 | 61 63 79 63 6c 69 63 0d |irected |acyclic.|
|00003120| 67 72 61 70 68 20 28 44 | 41 47 29 20 77 68 6f 73 |graph (D|AG) whos|
|00003130| 65 20 6e 6f 64 65 73 20 | 72 65 70 72 65 73 65 6e |e nodes |represen|
|00003140| 74 20 65 61 63 68 20 76 | 61 6c 75 65 20 67 65 6e |t each v|alue gen|
|00003150| 65 72 61 74 65 64 20 61 | 6e 64 20 77 68 6f 73 65 |erated a|nd whose|
|00003160| 20 65 64 67 65 73 0d 72 | 65 70 72 65 73 65 6e 74 | edges.r|epresent|
|00003170| 20 75 73 65 73 20 6f 66 | 20 74 68 6f 73 65 20 76 | uses of| those v|
|00003180| 61 6c 75 65 73 2e 20 20 | 4e 6f 74 65 20 69 74 20 |alues. |Note it |
|00003190| 69 73 6e 27 74 20 61 20 | 74 72 65 65 2c 20 73 69 |isn't a |tree, si|
|000031a0| 6e 63 65 20 6d 6f 72 65 | 20 74 68 61 6e 0d 6f 6e |nce more| than.on|
|000031b0| 65 20 65 64 67 65 20 63 | 61 6e 20 67 6f 20 69 6e |e edge c|an go in|
|000031c0| 74 6f 20 61 20 6e 6f 64 | 65 2e 20 20 54 68 65 6e |to a nod|e. Then|
|000031d0| 20 6f 70 74 69 6d 69 7a | 61 74 69 6f 6e 20 63 61 | optimiz|ation ca|
|000031e0| 6e 20 62 65 20 64 6f 6e | 65 2c 20 61 6e 64 20 63 |n be don|e, and c|
|000031f0| 6f 6d 6d 6f 6e 0d 73 75 | 62 65 78 70 72 65 73 73 |ommon.su|bexpress|
|00003200| 69 6f 6e 73 20 28 69 2e | 65 2e 20 6e 6f 64 65 73 |ions (i.|e. nodes|
|00003210| 29 20 63 6f 6d 62 69 6e | 65 64 2e 0d 0d 54 68 65 |) combin|ed...The|
|00003220| 6e 2c 20 75 73 69 6e 67 | 20 67 72 61 70 68 20 63 |n, using| graph c|
|00003230| 6f 6c 6f 72 69 6e 67 20 | 6f 72 20 77 68 61 74 65 |oloring |or whate|
|00003240| 76 65 72 2c 20 74 68 65 | 20 6e 6f 64 65 73 20 61 |ver, the| nodes a|
|00003250| 72 65 20 61 73 73 69 67 | 6e 65 64 20 74 6f 0d 72 |re assig|ned to.r|
|00003260| 65 67 69 73 74 65 72 73 | 2e 20 20 54 68 69 73 20 |egisters|. This |
|00003270| 61 73 73 75 6d 65 73 20 | 74 68 65 72 65 20 61 72 |assumes |there ar|
|00003280| 65 20 6c 65 73 73 20 72 | 65 67 73 20 74 68 61 6e |e less r|egs than|
|00003290| 20 6e 6f 64 65 73 2c 20 | 73 6f 20 74 68 61 74 20 | nodes, |so that |
|000032a0| 77 65 0d 68 61 76 65 20 | 74 6f 20 66 69 6e 64 20 |we.have |to find |
|000032b0| 61 6c 6c 20 64 65 70 65 | 6e 64 65 6e 63 69 65 73 |all depe|ndencies|
|000032c0| 2c 20 61 6e 64 20 72 65 | 2d 75 73 65 20 61 20 72 |, and re|-use a r|
|000032d0| 65 67 20 77 68 65 6e 20 | 69 74 73 20 6f 6c 64 20 |eg when |its old |
|000032e0| 76 61 6c 75 65 0d 69 73 | 6e 27 74 20 6e 65 65 64 |value.is|n't need|
|000032f0| 65 64 20 61 6e 79 20 6d | 6f 72 65 2e 0d 0d 48 65 |ed any m|ore...He|
|00003300| 72 65 20 77 65 20 63 61 | 6e 20 73 69 6d 70 6c 69 |re we ca|n simpli|
|00003310| 66 79 20 74 68 69 6e 67 | 73 20 61 20 6c 69 74 74 |fy thing|s a litt|
|00003320| 6c 65 2c 20 61 6e 64 20 | 6d 61 6e 61 67 65 20 65 |le, and |manage e|
|00003330| 76 65 72 79 74 68 69 6e | 67 20 69 6e 20 6f 6e 65 |verythin|g in one|
|00003340| 20 70 61 73 73 2e 0d 4f | 6e 20 74 68 65 20 50 50 | pass..O|n the PP|
|00003350| 43 20 77 65 20 68 61 76 | 65 20 73 6f 20 6d 61 6e |C we hav|e so man|
|00003360| 79 20 72 65 67 73 20 74 | 68 61 74 20 66 6f 72 20 |y regs t|hat for |
|00003370| 6e 6f 72 6d 61 6c 20 73 | 68 6f 72 74 69 73 68 20 |normal s|hortish |
|00003380| 62 61 73 69 63 20 62 6c | 6f 63 6b 73 2c 0d 77 65 |basic bl|ocks,.we|
|00003390| 20 77 69 6c 6c 20 67 65 | 6e 65 72 61 6c 6c 79 20 | will ge|nerally |
|000033a0| 62 65 20 61 62 6c 65 20 | 74 6f 20 73 69 6d 70 6c |be able |to simpl|
|000033b0| 79 20 61 73 73 69 67 6e | 20 61 20 64 69 66 66 65 |y assign| a diffe|
|000033c0| 72 65 6e 74 20 72 65 67 | 20 66 6f 72 20 65 61 63 |rent reg| for eac|
|000033d0| 68 20 6e 6f 64 65 2e 0d | 4f 6e 20 74 68 65 20 66 |h node..|On the f|
|000033e0| 65 77 20 6f 63 63 61 73 | 69 6f 6e 73 20 77 68 65 |ew occas|ions whe|
|000033f0| 6e 20 77 65 20 64 6f 6e | 27 74 20 68 61 76 65 20 |n we don|'t have |
|00003400| 61 20 66 72 65 65 20 72 | 65 67 2c 20 77 65 20 63 |a free r|eg, we c|
|00003410| 61 6e 20 73 65 6c 65 63 | 74 20 6f 6e 65 0d 77 68 |an selec|t one.wh|
|00003420| 69 63 68 20 68 61 73 20 | 61 20 76 61 6c 75 65 20 |ich has |a value |
|00003430| 77 69 74 68 20 6e 6f 20 | 6f 75 74 73 74 61 6e 64 |with no |outstand|
|00003440| 69 6e 67 20 72 65 66 65 | 72 65 6e 63 65 73 20 2d |ing refe|rences -|
|00003450| 20 74 68 65 72 65 27 73 | 20 61 20 73 6c 69 67 68 | there's| a sligh|
|00003460| 74 20 63 68 61 6e 63 65 | 0d 77 65 20 63 6f 75 6c |t chance|.we coul|
|00003470| 64 20 68 61 76 65 20 75 | 73 65 64 20 74 68 69 73 |d have u|sed this|
|00003480| 20 76 61 6c 75 65 20 69 | 6e 20 61 20 73 75 62 73 | value i|n a subs|
|00003490| 65 71 75 65 6e 74 20 6f | 70 2c 20 62 75 74 20 74 |equent o|p, but t|
|000034a0| 68 69 73 20 69 73 20 70 | 72 65 74 74 79 20 77 65 |his is p|retty we|
|000034b0| 6c 6c 0d 6e 65 67 6c 69 | 67 69 62 6c 65 2e 20 20 |ll.negli|gible. |
|000034c0| 57 65 20 63 61 6e 20 6f | 70 74 69 6d 69 7a 65 20 |We can o|ptimize |
|000034d0| 6f 6e 20 74 68 65 20 66 | 6c 79 3a 20 65 61 63 68 |on the f|ly: each|
|000034e0| 20 74 69 6d 65 20 77 65 | 20 67 65 74 20 61 20 6e | time we| get a n|
|000034f0| 65 77 20 76 61 6c 75 65 | 2c 0d 77 65 20 63 61 6e |ew value|,.we can|
|00003500| 20 73 65 61 72 63 68 20 | 74 68 65 20 72 65 67 20 | search |the reg |
|00003510| 73 65 74 20 66 6f 72 20 | 61 20 6d 61 74 63 68 20 |set for |a match |
|00003520| 73 6f 20 77 65 20 63 61 | 6e 20 75 73 65 20 61 20 |so we ca|n use a |
|00003530| 63 6f 6d 62 69 6e 65 64 | 20 6e 6f 64 65 2e 0d 0d |combined| node...|
|00003540| 54 68 69 73 20 63 6f 64 | 65 20 69 73 20 69 6e 76 |This cod|e is inv|
|00003550| 6f 6b 65 64 20 61 73 20 | 66 6f 6c 6c 6f 77 73 3a |oked as |follows:|
|00003560| 0d 57 68 65 6e 65 76 65 | 72 20 48 61 6e 64 6c 65 |.Wheneve|r Handle|
|00003570| 72 73 20 69 73 20 63 61 | 6c 6c 65 64 20 74 6f 20 |rs is ca|lled to |
|00003580| 67 65 6e 65 72 61 74 65 | 20 36 38 4b 20 63 6f 64 |generate| 68K cod|
|00003590| 65 2c 20 69 66 20 50 50 | 43 3f 20 69 73 20 74 72 |e, if PP|C? is tr|
|000035a0| 75 65 2c 0d 74 68 65 20 | 48 61 6e 64 6c 65 72 73 |ue,.the |Handlers|
|000035b0| 20 73 65 6c 65 63 74 6f | 72 20 61 6e 64 20 6f 70 | selecto|r and op|
|000035c0| 63 6f 64 65 20 69 73 20 | 70 75 73 68 65 64 20 61 |code is |pushed a|
|000035d0| 6e 64 20 50 50 43 76 65 | 63 20 69 73 20 65 78 65 |nd PPCve|c is exe|
|000035e0| 63 75 74 65 64 2e 0d 57 | 65 20 77 69 6c 6c 20 73 |cuted..W|e will s|
|000035f0| 65 74 20 50 50 43 76 65 | 63 20 74 6f 20 70 6f 69 |et PPCve|c to poi|
|00003600| 6e 74 20 74 6f 20 50 50 | 43 5f 63 6f 6d 70 69 6c |nt to PP|C_compil|
|00003610| 65 20 77 68 69 63 68 20 | 77 69 6c 6c 20 75 73 65 |e which |will use|
|00003620| 20 74 68 65 20 73 65 6c | 65 63 74 6f 72 0d 74 6f | the sel|ector.to|
|00003630| 20 64 69 73 70 61 74 63 | 68 20 74 6f 20 74 68 65 | dispatc|h to the|
|00003640| 20 72 69 67 68 74 20 72 | 6f 75 74 69 6e 65 2e 0d | right r|outine..|
|00003650| 0d 0d 09 09 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |....====|========|
|00003660| 3d 09 4d 45 4d 4f 52 59 | 20 41 52 43 48 49 54 45 |=.MEMORY| ARCHITE|
|00003670| 43 54 55 52 45 09 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |CTURE.==|========|
|00003680| 3d 3d 3d 3d 3d 3d 0d 0d | 4f 6e 20 74 68 65 20 50 |======..|On the P|
|00003690| 50 43 2c 20 63 6f 64 65 | 20 61 6e 64 20 64 61 74 |PC, code| and dat|
|000036a0| 61 20 69 73 20 6e 6f 72 | 6d 61 6c 6c 79 20 6b 65 |a is nor|mally ke|
|000036b0| 70 74 20 73 65 70 61 72 | 61 74 65 2c 20 77 69 74 |pt separ|ate, wit|
|000036c0| 68 20 74 68 65 20 63 6f | 64 65 0d 62 65 69 6e 67 |h the co|de.being|
|000036d0| 20 72 65 61 64 2d 6f 6e | 6c 79 2e 20 20 54 68 65 | read-on|ly. The|
|000036e0| 20 50 45 46 20 66 6f 72 | 6d 61 74 20 64 65 66 69 | PEF for|mat defi|
|000036f0| 6e 65 73 20 73 65 70 61 | 72 61 74 65 20 63 6f 64 |nes sepa|rate cod|
|00003700| 65 20 61 6e 64 20 64 61 | 74 61 20 73 65 63 74 69 |e and da|ta secti|
|00003710| 6f 6e 73 2c 0d 61 6e 64 | 20 61 74 20 6c 61 75 6e |ons,.and| at laun|
|00003720| 63 68 20 74 69 6d 65 20 | 74 68 65 73 65 20 61 72 |ch time |these ar|
|00003730| 65 20 70 6c 61 63 65 64 | 20 69 6e 20 70 6f 69 6e |e placed| in poin|
|00003740| 74 65 72 2d 62 61 73 65 | 64 20 62 6c 6f 63 6b 73 |ter-base|d blocks|
|00003750| 20 69 6e 20 6d 65 6d 6f | 72 79 2e 0d 57 65 20 6f | in memo|ry..We o|
|00003760| 75 67 68 74 20 74 6f 20 | 63 6f 6e 66 6f 72 6d 20 |ught to |conform |
|00003770| 74 6f 20 74 68 69 73 20 | 63 6f 6e 76 65 6e 74 69 |to this |conventi|
|00003780| 6f 6e 20 66 6f 72 20 69 | 6e 73 74 61 6c 6c 65 64 |on for i|nstalled|
|00003790| 20 61 70 70 73 2c 20 73 | 69 6e 63 65 20 69 74 20 | apps, s|ince it |
|000037a0| 77 69 6c 6c 0d 67 69 76 | 65 20 74 68 65 20 62 65 |will.giv|e the be|
|000037b0| 73 74 20 70 65 72 66 6f | 72 6d 61 6e 63 65 2e 0d |st perfo|rmance..|
|000037c0| 0d 49 6e 20 74 68 65 20 | 64 65 76 65 6c 6f 70 6d |.In the |developm|
|000037d0| 65 6e 74 20 65 6e 76 69 | 72 6f 6e 6d 65 6e 74 2c |ent envi|ronment,|
|000037e0| 20 6f 75 72 20 64 69 63 | 74 69 6f 6e 61 72 79 20 | our dic|tionary |
|000037f0| 73 68 6f 75 6c 64 20 62 | 65 20 69 6e 20 61 20 72 |should b|e in a r|
|00003800| 65 61 64 2d 77 72 69 74 | 65 0d 62 6c 6f 63 6b 20 |ead-writ|e.block |
|00003810| 66 6f 72 20 6f 62 76 69 | 6f 75 73 20 72 65 61 73 |for obvi|ous reas|
|00003820| 6f 6e 73 2e 20 20 57 65 | 27 6c 6c 20 64 65 66 69 |ons. We|'ll defi|
|00003830| 6e 65 20 61 20 73 65 70 | 61 72 61 74 65 20 64 61 |ne a sep|arate da|
|00003840| 74 61 20 61 72 65 61 2c | 20 77 68 69 63 68 0d 77 |ta area,| which.w|
|00003850| 69 6c 6c 20 62 65 63 6f | 6d 65 20 74 68 65 20 64 |ill beco|me the d|
|00003860| 61 74 61 20 73 65 63 74 | 69 6f 6e 20 6f 66 20 61 |ata sect|ion of a|
|00003870| 6e 20 69 6e 73 74 61 6c | 6c 65 64 20 61 70 70 2e |n instal|led app.|
|00003880| 20 20 54 68 65 73 65 20 | 74 77 6f 20 61 72 65 61 | These |two area|
|00003890| 73 0d 63 61 6e 20 62 65 | 20 69 6e 20 68 61 6e 64 |s.can be| in hand|
|000038a0| 6c 65 73 2c 20 77 68 69 | 63 68 20 77 69 6c 6c 20 |les, whi|ch will |
|000038b0| 61 6c 6c 6f 77 20 75 73 | 20 74 6f 20 72 65 73 69 |allow us| to resi|
|000038c0| 7a 65 20 74 68 65 6d 20 | 6f 6e 20 74 68 65 20 66 |ze them |on the f|
|000038d0| 6c 79 20 69 66 0d 6e 65 | 63 65 73 73 61 72 79 2e |ly if.ne|cessary.|
|000038e0| 0d 0d 41 74 20 69 6e 73 | 74 61 6c 6c 61 74 69 6f |..At ins|tallatio|
|000038f0| 6e 20 74 69 6d 65 2c 20 | 77 65 27 6c 6c 20 67 65 |n time, |we'll ge|
|00003900| 6e 65 72 61 74 65 20 61 | 20 50 45 46 20 69 6e 20 |nerate a| PEF in |
|00003910| 77 68 69 63 68 20 74 68 | 65 20 64 69 63 74 69 6f |which th|e dictio|
|00003920| 6e 61 72 79 20 69 73 0d | 61 64 64 65 64 20 74 6f |nary is.|added to|
|00003930| 20 74 68 65 20 65 78 69 | 73 74 69 6e 67 20 63 6f | the exi|sting co|
|00003940| 64 65 20 73 65 63 74 69 | 6f 6e 2c 20 61 6e 64 20 |de secti|on, and |
|00003950| 74 68 65 20 64 61 74 61 | 20 61 72 65 61 20 69 73 |the data| area is|
|00003960| 20 61 64 64 65 64 20 74 | 6f 20 74 68 65 0d 64 61 | added t|o the.da|
|00003970| 74 61 20 73 65 63 74 69 | 6f 6e 2e 20 20 4f 75 72 |ta secti|on. Our|
|00003980| 20 69 6e 69 74 69 61 6c | 20 6e 75 63 6c 65 75 73 | initial| nucleus|
|00003990| 20 77 69 6c 6c 20 70 72 | 6f 62 61 62 6c 79 20 62 | will pr|obably b|
|000039a0| 65 20 67 65 6e 65 72 61 | 74 65 64 20 65 78 61 63 |e genera|ted exac|
|000039b0| 74 6c 79 0d 74 68 69 73 | 20 77 61 79 2c 20 65 69 |tly.this| way, ei|
|000039c0| 74 68 65 72 20 66 72 6f | 6d 20 74 68 65 20 36 38 |ther fro|m the 68|
|000039d0| 6b 20 6f 72 20 50 50 43 | 20 76 65 72 73 69 6f 6e |k or PPC| version|
|000039e0| 2e 20 20 54 68 75 73 20 | 6f 75 72 20 69 6e 69 74 |. Thus |our init|
|000039f0| 69 61 6c 0d 6e 75 63 6c | 65 75 73 20 69 73 20 73 |ial.nucl|eus is s|
|00003a00| 69 6d 70 6c 79 20 61 6e | 20 61 70 70 6c 69 63 61 |imply an| applica|
|00003a10| 74 69 6f 6e 2c 20 77 68 | 69 63 68 20 74 72 61 6e |tion, wh|ich tran|
|00003a20| 73 66 6f 72 6d 73 20 69 | 74 73 65 6c 66 20 69 6e |sforms i|tself in|
|00003a30| 74 6f 20 74 68 65 0d 4d | 6f 70 73 20 64 65 76 65 |to the.M|ops deve|
|00003a40| 6c 6f 70 6d 65 6e 74 20 | 65 6e 76 69 72 6f 6e 6d |lopment |environm|
|00003a50| 65 6e 74 20 62 79 20 63 | 72 65 61 74 69 6e 67 20 |ent by c|reating |
|00003a60| 61 20 68 61 6e 64 6c 65 | 20 66 6f 72 20 74 68 65 |a handle| for the|
|00003a70| 20 6e 65 77 20 64 69 63 | 74 69 6f 6e 61 72 79 0d | new dic|tionary.|
|00003a80| 61 6e 64 20 64 61 74 61 | 20 61 72 65 61 73 2e 20 |and data| areas. |
|00003a90| 20 4e 6f 77 2c 20 77 65 | 20 63 6f 75 6c 64 20 61 | Now, we| could a|
|00003aa0| 6c 6c 6f 77 20 74 68 65 | 20 6e 65 77 20 64 69 63 |llow the| new dic|
|00003ab0| 74 69 6f 6e 61 72 79 20 | 61 72 65 61 20 74 6f 20 |tionary |area to |
|00003ac0| 6c 69 6e 6b 0d 69 74 73 | 65 6c 66 20 74 6f 20 74 |link.its|elf to t|
|00003ad0| 68 65 20 6f 6c 64 20 6f | 6e 65 20 62 79 20 73 6f |he old o|ne by so|
|00003ae0| 6d 65 20 63 6c 65 76 65 | 72 6e 65 73 73 2c 20 62 |me cleve|rness, b|
|00003af0| 75 74 20 73 69 6e 63 65 | 20 74 68 65 20 64 69 63 |ut since| the dic|
|00003b00| 20 77 6f 75 6c 64 0d 6f | 6e 6c 79 20 62 65 20 67 | would.o|nly be g|
|00003b10| 65 74 74 69 6e 67 20 73 | 70 6c 69 74 20 61 74 20 |etting s|plit at |
|00003b20| 6f 6e 65 20 70 6c 61 63 | 65 20 49 20 64 6f 6e 27 |one plac|e I don'|
|00003b30| 74 20 74 68 69 6e 6b 20 | 69 74 20 77 6f 75 6c 64 |t think |it would|
|00003b40| 20 62 65 20 77 6f 72 74 | 68 0d 74 68 65 20 63 6f | be wort|h.the co|
|00003b50| 6d 70 6c 65 78 69 74 79 | 2e 20 20 42 65 74 74 65 |mplexity|. Bette|
|00003b60| 72 20 74 6f 20 6a 75 73 | 74 20 42 6c 6f 63 6b 4d |r to jus|t BlockM|
|00003b70| 6f 76 65 20 74 68 65 20 | 6f 6c 64 20 64 69 63 20 |ove the |old dic |
|00003b80| 61 72 65 61 20 74 6f 20 | 74 68 65 20 73 74 61 72 |area to |the star|
|00003b90| 74 0d 6f 66 20 74 68 65 | 20 6e 65 77 20 77 68 65 |t.of the| new whe|
|00003ba0| 6e 20 74 68 65 20 64 65 | 76 20 65 6e 76 69 72 6f |n the de|v enviro|
|00003bb0| 6e 6d 65 6e 74 20 69 73 | 20 62 65 69 6e 67 20 73 |nment is| being s|
|00003bc0| 65 74 20 75 70 2c 20 61 | 6e 64 20 6c 69 6b 65 77 |et up, a|nd likew|
|00003bd0| 69 73 65 20 66 6f 72 0d | 74 68 65 20 64 61 74 61 |ise for.|the data|
|00003be0| 20 61 72 65 61 2e 0d 0d | 43 6f 6c 6f 6e 20 75 73 | area...|Colon us|
|00003bf0| 65 73 20 61 20 6e 65 77 | 20 68 65 61 64 65 72 20 |es a new| header |
|00003c00| 66 6f 72 6d 61 74 20 69 | 6e 63 6f 72 70 6f 72 61 |format i|ncorpora|
|00003c10| 74 69 6e 67 20 74 77 6f | 20 66 6c 61 67 20 62 79 |ting two| flag by|
|00003c20| 74 65 73 20 69 6e 20 61 | 64 64 69 74 69 6f 6e 20 |tes in a|ddition |
|00003c30| 74 6f 0d 77 68 61 74 20 | 77 65 20 75 73 65 20 6f |to.what |we use o|
|00003c40| 6e 20 74 68 65 20 36 38 | 6b 2c 20 61 6e 64 20 61 |n the 68|k, and a|
|00003c50| 6c 73 6f 20 68 61 73 20 | 74 6f 20 6f 62 73 65 72 |lso has |to obser|
|00003c60| 76 65 20 34 2d 62 79 74 | 65 20 61 6c 69 67 6e 6d |ve 4-byt|e alignm|
|00003c70| 65 6e 74 20 66 6f 72 20 | 74 68 65 0d 63 6f 64 65 |ent for |the.code|
|00003c80| 2e 20 20 46 6f 72 20 74 | 68 69 73 20 72 65 61 73 |. For t|his reas|
|00003c90| 6f 6e 20 77 65 20 67 65 | 6e 65 72 61 74 65 20 61 |on we ge|nerate a|
|00003ca0| 20 66 75 6c 6c 20 50 50 | 43 2d 73 74 79 6c 65 20 | full PP|C-style |
|00003cb0| 68 65 61 64 65 72 20 28 | 69 6e 63 6c 75 64 69 6e |header (|includin|
|00003cc0| 67 20 34 2d 62 79 74 65 | 0d 61 6c 69 67 6e 6d 65 |g 4-byte|.alignme|
|00003cd0| 6e 74 29 20 66 6f 72 20 | 63 6f 6c 6f 6e 20 64 65 |nt) for |colon de|
|00003ce0| 66 69 6e 69 74 69 6f 6e | 73 2e 20 20 57 68 65 6e |finition|s. When|
|00003cf0| 20 77 65 20 63 6f 6d 70 | 69 6c 65 20 61 20 63 61 | we comp|ile a ca|
|00003d00| 6c 6c 20 74 6f 20 61 20 | 63 6f 6c 6f 6e 20 64 65 |ll to a |colon de|
|00003d10| 66 6e 20 77 65 0d 68 61 | 76 65 20 74 6f 20 64 6f |fn we.ha|ve to do|
|00003d20| 20 50 50 43 2d 73 74 79 | 6c 65 20 61 6c 69 67 6e | PPC-sty|le align|
|00003d30| 6d 65 6e 74 20 65 76 65 | 6e 20 6f 6e 20 74 68 65 |ment eve|n on the|
|00003d40| 20 36 38 6b 2e 20 20 46 | 6f 72 20 6f 74 68 65 72 | 68k. F|or other|
|00003d50| 20 74 79 70 65 73 20 6f | 66 20 64 65 66 69 6e 69 | types o|f defini|
|00003d60| 74 69 6f 6e 0d 77 65 20 | 64 6f 6e 27 74 20 68 61 |tion.we |don't ha|
|00003d70| 76 65 20 74 6f 20 62 6f | 74 68 65 72 2c 20 61 6e |ve to bo|ther, an|
|00003d80| 64 20 74 68 65 20 63 6f | 64 65 20 73 68 6f 75 6c |d the co|de shoul|
|00003d90| 64 20 77 6f 72 6b 20 6f | 6e 20 62 6f 74 68 20 70 |d work o|n both p|
|00003da0| 6c 61 74 66 6f 72 6d 73 | 20 28 73 69 6e 63 65 0d |latforms| (since.|
|00003db0| 6f 6e 20 74 68 65 20 50 | 50 43 20 46 49 4e 44 20 |on the P|PC FIND |
|00003dc0| 77 69 6c 6c 20 6c 6f 6f | 6b 20 61 66 74 65 72 20 |will loo|k after |
|00003dd0| 74 68 65 20 65 78 74 72 | 61 20 61 6c 69 67 6e 6d |the extr|a alignm|
|00003de0| 65 6e 74 29 2e 0d 0d 0d | 09 09 3d 3d 3d 3d 3d 3d |ent)....|..======|
|00003df0| 3d 3d 3d 3d 3d 3d 3d 09 | 52 45 47 49 53 54 45 52 |=======.|REGISTER|
|00003e00| 20 44 45 46 49 4e 49 54 | 49 4f 4e 53 3a 09 3d 3d | DEFINIT|IONS:.==|
|00003e10| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 0d 0d |========|======..|
|00003e20| 57 65 20 6e 65 65 64 20 | 33 20 72 65 67 73 20 66 |We need |3 regs f|
|00003e30| 6f 72 20 73 63 72 61 74 | 63 68 20 69 6e 20 62 6f |or scrat|ch in bo|
|00003e40| 69 6c 65 72 70 6c 61 74 | 65 20 63 6f 64 65 20 73 |ilerplat|e code s|
|00003e50| 65 71 75 65 6e 63 65 73 | 2e 20 20 57 65 27 6c 6c |equences|. We'll|
|00003e60| 20 75 73 65 0d 72 30 2c | 20 77 68 69 63 68 20 69 | use.r0,| which i|
|00003e70| 73 20 61 20 62 69 74 20 | 75 6e 75 73 75 61 6c 20 |s a bit |unusual |
|00003e80| 61 6e 79 77 61 79 2c 20 | 61 6e 64 20 72 31 31 20 |anyway, |and r11 |
|00003e90| 61 6e 64 20 72 31 32 20 | 28 73 65 65 20 62 65 6c |and r12 |(see bel|
|00003ea0| 6f 77 29 2e 0d 0d 72 31 | 20 69 73 20 74 68 65 20 |ow)...r1| is the |
|00003eb0| 73 74 61 63 6b 20 70 6f | 69 6e 74 65 72 2c 20 72 |stack po|inter, r|
|00003ec0| 32 20 69 73 20 52 54 4f | 43 2e 20 20 57 65 20 63 |2 is RTO|C. We c|
|00003ed0| 61 6e 27 74 20 6d 6f 6e | 6b 65 79 20 77 69 74 68 |an't mon|key with|
|00003ee0| 20 74 68 65 73 65 2e 0d | 72 31 31 20 61 6e 64 20 | these..|r11 and |
|00003ef0| 72 31 32 20 61 72 65 20 | 75 73 65 64 20 69 6e 20 |r12 are |used in |
|00003f00| 74 68 65 20 63 61 6c 6c | 69 6e 67 20 73 65 71 75 |the call|ing sequ|
|00003f10| 65 6e 63 65 20 66 6f 72 | 20 65 78 74 65 72 6e 61 |ence for| externa|
|00003f20| 6c 20 63 61 6c 6c 73 2e | 20 20 41 70 70 6c 65 0d |l calls.| Apple.|
|00003f30| 73 61 79 73 20 74 68 65 | 79 20 63 61 6e 20 62 65 |says the|y can be|
|00003f40| 20 75 73 65 64 20 61 73 | 20 73 63 72 61 74 63 68 | used as| scratch|
|00003f50| 20 61 74 20 61 6c 6c 20 | 6f 74 68 65 72 20 74 69 | at all |other ti|
|00003f60| 6d 65 73 2c 20 73 6f 20 | 77 65 27 6c 6c 20 75 73 |mes, so |we'll us|
|00003f70| 65 20 74 68 65 6d 0d 69 | 6e 20 62 6f 69 6c 65 72 |e them.i|n boiler|
|00003f80| 70 6c 61 74 65 20 73 65 | 71 75 65 6e 63 65 73 2e |plate se|quences.|
|00003f90| 20 20 50 6f 77 65 72 4d | 61 63 46 6f 72 74 68 20 | PowerM|acForth |
|00003fa0| 64 6f 65 73 20 74 68 69 | 73 20 74 6f 6f 2c 20 61 |does thi|s too, a|
|00003fb0| 6e 64 20 69 6e 20 74 68 | 65 20 61 73 73 65 6d 62 |nd in th|e assemb|
|00003fc0| 6c 65 72 0d 74 68 65 79 | 27 72 65 20 61 6c 69 61 |ler.they|'re alia|
|00003fd0| 73 65 64 20 61 73 20 72 | 58 20 61 6e 64 20 72 59 |sed as r|X and rY|
|00003fe0| 2e 0d 0d 46 6f 72 20 65 | 78 74 65 72 6e 61 6c 20 |...For e|xternal |
|00003ff0| 63 61 6c 6c 73 2c 20 72 | 33 2d 72 31 30 20 61 72 |calls, r|3-r10 ar|
|00004000| 65 20 75 73 65 64 20 66 | 6f 72 20 70 61 72 61 6d |e used f|or param|
|00004010| 65 74 65 72 73 2c 20 61 | 6e 64 20 72 33 20 66 6f |eters, a|nd r3 fo|
|00004020| 72 20 61 20 72 65 74 75 | 72 6e 65 64 0d 72 65 73 |r a retu|rned.res|
|00004030| 75 6c 74 2e 20 20 54 68 | 65 79 20 77 6f 6e 27 74 |ult. Th|ey won't|
|00004040| 20 62 65 20 73 61 76 65 | 64 20 6f 76 65 72 20 74 | be save|d over t|
|00004050| 68 65 20 63 61 6c 6c 73 | 2e 20 20 4f 66 20 63 6f |he calls|. Of co|
|00004060| 75 72 73 65 20 66 6f 72 | 20 69 6e 74 65 72 6e 61 |urse for| interna|
|00004070| 6c 20 4d 6f 70 73 0d 63 | 61 6c 6c 73 20 77 65 20 |l Mops.c|alls we |
|00004080| 63 61 6e 20 64 6f 20 77 | 68 61 74 20 77 65 20 6c |can do w|hat we l|
|00004090| 69 6b 65 2e 20 20 57 65 | 20 63 61 6e 20 75 73 65 |ike. We| can use|
|000040a0| 20 74 68 65 73 65 20 72 | 65 67 73 20 66 6f 72 20 | these r|egs for |
|000040b0| 67 65 6e 65 72 61 6c 20 | 6f 70 65 72 61 6e 64 73 |general |operands|
|000040c0| 2c 0d 61 6e 64 20 6f 6e | 20 61 6e 20 65 78 74 65 |,.and on| an exte|
|000040d0| 72 6e 61 6c 20 63 61 6c | 6c 20 6e 6f 72 6d 61 6c |rnal cal|l normal|
|000040e0| 69 7a 65 20 74 68 65 20 | 73 74 61 63 6b 20 73 6f |ize the |stack so|
|000040f0| 20 74 68 61 74 20 74 68 | 65 20 72 65 71 75 69 72 | that th|e requir|
|00004100| 65 64 20 6e 75 6d 62 65 | 72 20 6f 66 0d 63 65 6c |ed numbe|r of.cel|
|00004110| 6c 73 20 61 72 65 20 73 | 74 6f 72 65 64 20 69 6e |ls are s|tored in|
|00004120| 20 72 33 20 6f 6e 2e 20 | 20 41 74 20 74 68 61 74 | r3 on. | At that|
|00004130| 20 73 74 61 67 65 20 77 | 65 20 77 6f 6e 27 74 20 | stage w|e won't |
|00004140| 68 61 76 65 20 61 6e 79 | 20 6f 74 68 65 72 20 63 |have any| other c|
|00004150| 61 63 68 65 64 0d 73 74 | 61 63 6b 20 63 65 6c 6c |ached.st|ack cell|
|00004160| 73 2c 20 73 6f 20 77 65 | 20 64 6f 6e 27 74 20 6e |s, so we| don't n|
|00004170| 65 65 64 20 74 68 65 20 | 72 65 67 73 20 70 72 65 |eed the |regs pre|
|00004180| 73 65 72 76 65 64 20 61 | 6e 79 77 61 79 2e 0d 0d |served a|nyway...|
|00004190| 54 68 69 73 20 73 63 65 | 6e 61 72 69 6f 20 67 69 |This sce|nario gi|
|000041a0| 76 65 73 20 75 73 20 38 | 20 72 65 67 73 20 66 6f |ves us 8| regs fo|
|000041b0| 72 20 67 65 6e 65 72 61 | 6c 20 6f 70 65 72 61 6e |r genera|l operan|
|000041c0| 64 73 2c 20 69 2e 65 2e | 20 63 61 63 68 65 64 20 |ds, i.e.| cached |
|000041d0| 73 74 61 63 6b 0d 63 65 | 6c 6c 73 20 28 72 33 2d |stack.ce|lls (r3-|
|000041e0| 72 31 30 29 2c 20 77 68 | 69 63 68 20 73 68 6f 75 |r10), wh|ich shou|
|000041f0| 6c 64 20 62 65 20 65 6e | 6f 75 67 68 2e 20 20 49 |ld be en|ough. I|
|00004200| 66 20 69 74 20 74 75 72 | 6e 73 20 6f 75 74 20 6e |f it tur|ns out n|
|00004210| 6f 74 20 74 6f 20 62 65 | 20 65 6e 6f 75 67 68 0d |ot to be| enough.|
|00004220| 77 65 20 63 6f 75 6c 64 | 20 67 72 61 62 20 61 20 |we could| grab a |
|00004230| 63 6f 75 70 6c 65 20 6f | 66 20 74 68 65 20 72 65 |couple o|f the re|
|00004240| 67 73 20 77 65 27 76 65 | 20 61 6c 6c 6f 63 61 74 |gs we've| allocat|
|00004250| 65 64 20 66 6f 72 20 6c | 6f 63 61 6c 73 20 28 73 |ed for l|ocals (s|
|00004260| 65 65 20 62 65 6c 6f 77 | 29 2e 0d 0d 72 31 33 2d |ee below|)...r13-|
|00004270| 33 31 20 61 72 65 20 22 | 6e 6f 6e 2d 76 6f 6c 61 |31 are "|non-vola|
|00004280| 74 69 6c 65 22 20 2d 20 | 74 68 65 79 27 72 65 20 |tile" - |they're |
|00004290| 73 61 76 65 64 20 6f 76 | 65 72 20 65 78 74 65 72 |saved ov|er exter|
|000042a0| 6e 61 6c 20 63 61 6c 6c | 73 2e 20 20 46 6f 72 0d |nal call|s. For.|
|000042b0| 69 6e 74 65 72 6e 61 6c | 20 4d 6f 70 73 20 63 61 |internal| Mops ca|
|000042c0| 6c 6c 73 20 77 65 20 6a | 75 73 74 20 6e 65 65 64 |lls we j|ust need|
|000042d0| 20 74 6f 20 73 61 76 65 | 20 74 68 65 20 6c 6f 63 | to save| the loc|
|000042e0| 61 6c 73 2c 20 73 69 6e | 63 65 20 6f 74 68 65 72 |als, sin|ce other|
|000042f0| 20 72 65 67 73 0d 6c 69 | 6b 65 20 74 68 65 20 62 | regs.li|ke the b|
|00004300| 61 73 65 20 61 64 64 72 | 65 73 73 20 72 65 67 73 |ase addr|ess regs|
|00004310| 20 64 6f 6e 27 74 20 67 | 65 74 20 63 68 61 6e 67 | don't g|et chang|
|00004320| 65 64 2e 0d 0d 4e 6f 77 | 20 66 6f 72 20 74 68 65 |ed...Now| for the|
|00004330| 20 73 70 65 63 69 61 6c | 20 72 65 67 73 20 77 65 | special| regs we|
|00004340| 20 6e 65 65 64 2e 20 20 | 54 68 65 73 65 20 61 6c | need. |These al|
|00004350| 6c 20 6e 65 65 64 20 74 | 6f 20 62 65 20 73 61 76 |l need t|o be sav|
|00004360| 65 64 20 6f 76 65 72 20 | 65 78 74 65 72 6e 61 6c |ed over |external|
|00004370| 0d 63 61 6c 6c 73 2c 20 | 61 6e 64 20 73 6f 20 61 |.calls, |and so a|
|00004380| 72 65 20 69 6e 20 74 68 | 65 20 6e 6f 6e 2d 76 6f |re in th|e non-vo|
|00004390| 6c 61 74 69 6c 65 20 62 | 6c 6f 63 6b 2e 0d 0d 46 |latile b|lock...F|
|000043a0| 6f 72 20 61 64 64 72 65 | 73 73 69 6e 67 20 74 68 |or addre|ssing th|
|000043b0| 65 20 64 69 63 74 69 6f | 6e 61 72 79 2c 20 61 20 |e dictio|nary, a |
|000043c0| 64 69 66 66 65 72 65 6e | 63 65 20 74 6f 20 74 68 |differen|ce to th|
|000043d0| 65 20 36 38 6b 20 76 65 | 72 73 69 6f 6e 20 69 73 |e 68k ve|rsion is|
|000043e0| 20 74 68 61 74 0d 77 65 | 20 6e 65 65 64 20 74 6f | that.we| need to|
|000043f0| 20 6b 65 65 70 20 63 6f | 64 65 20 61 6e 64 20 64 | keep co|de and d|
|00004400| 61 74 61 20 73 65 70 61 | 72 61 74 65 20 28 73 65 |ata sepa|rate (se|
|00004410| 65 20 61 62 6f 76 65 29 | 2e 20 20 49 6e 20 74 68 |e above)|. In th|
|00004420| 65 20 64 65 76 65 6c 6f | 70 6d 65 6e 74 0d 65 6e |e develo|pment.en|
|00004430| 76 69 72 6f 6e 6d 65 6e | 74 20 74 68 65 73 65 20 |vironmen|t these |
|00004440| 77 69 6c 6c 20 62 65 20 | 69 6e 20 68 61 6e 64 6c |will be |in handl|
|00004450| 65 2d 62 61 73 65 64 20 | 62 6c 6f 63 6b 73 2c 20 |e-based |blocks, |
|00004460| 61 6e 64 20 69 6e 20 61 | 6e 20 69 6e 73 74 61 6c |and in a|n instal|
|00004470| 6c 65 64 0d 61 70 70 20 | 74 68 65 79 27 6c 6c 20 |led.app |they'll |
|00004480| 62 65 20 64 65 66 69 6e | 65 64 20 69 6e 20 74 68 |be defin|ed in th|
|00004490| 65 20 50 45 46 20 77 68 | 69 63 68 20 77 69 6c 6c |e PEF wh|ich will|
|000044a0| 20 6d 61 6b 65 20 74 68 | 65 6d 20 65 6e 64 20 75 | make th|em end u|
|000044b0| 70 20 69 6e 20 70 6f 69 | 6e 74 65 72 2d 0d 62 61 |p in poi|nter-.ba|
|000044c0| 73 65 64 20 62 6c 6f 63 | 6b 73 2e 20 20 41 6e 79 |sed bloc|ks. Any|
|000044d0| 77 61 79 2c 20 61 73 20 | 6c 6f 6e 67 20 61 73 20 |way, as |long as |
|000044e0| 77 65 20 68 61 6e 64 6c | 65 20 74 68 65 20 61 64 |we handl|e the ad|
|000044f0| 64 72 65 73 73 61 62 69 | 6c 69 74 79 20 71 75 65 |dressabi|lity que|
|00004500| 73 74 69 6f 6e 73 0d 70 | 72 6f 70 65 72 6c 79 2c |stions.p|roperly,|
|00004510| 20 69 74 20 73 68 6f 75 | 6c 64 6e 27 74 20 6d 61 | it shou|ldn't ma|
|00004520| 74 74 65 72 20 77 68 65 | 72 65 20 74 68 65 79 20 |tter whe|re they |
|00004530| 61 72 65 2e 0d 0d 43 6f | 64 65 20 72 65 66 65 72 |are...Co|de refer|
|00004540| 65 6e 63 65 73 20 77 69 | 6c 6c 20 62 65 20 66 6f |ences wi|ll be fo|
|00004550| 72 20 62 72 61 6e 63 68 | 65 73 2c 20 63 6f 6e 73 |r branch|es, cons|
|00004560| 74 61 6e 74 73 20 61 6e | 64 20 6f 74 68 65 72 20 |tants an|d other |
|00004570| 63 6f 6e 73 74 61 6e 74 | 20 64 61 74 61 0d 6c 69 |constant| data.li|
|00004580| 6b 65 20 6c 69 74 65 72 | 61 6c 20 73 74 72 69 6e |ke liter|al strin|
|00004590| 67 73 20 61 6e 64 20 63 | 6c 61 73 73 20 69 6e 66 |gs and c|lass inf|
|000045a0| 6f 2e 0d 0d 43 6f 6e 73 | 74 61 6e 74 73 20 63 61 |o...Cons|tants ca|
|000045b0| 6e 20 61 6c 77 61 79 73 | 20 62 65 20 68 61 6e 64 |n always| be hand|
|000045c0| 6c 65 64 20 76 69 61 20 | 6c 69 74 65 72 61 6c 20 |led via |literal |
|000045d0| 69 6e 73 74 72 75 63 74 | 69 6f 6e 73 2e 20 20 45 |instruct|ions. E|
|000045e0| 76 65 6e 20 69 66 20 69 | 74 0d 6e 65 65 64 73 20 |ven if i|t.needs |
|000045f0| 6d 6f 72 65 20 74 68 61 | 6e 20 31 36 20 62 69 74 |more tha|n 16 bit|
|00004600| 73 20 69 74 20 63 61 6e | 20 62 65 20 67 65 6e 65 |s it can| be gene|
|00004610| 72 61 74 65 64 20 69 6e | 20 61 20 72 65 67 20 77 |rated in| a reg w|
|00004620| 69 74 68 20 32 20 69 6e | 73 74 72 75 63 74 69 6f |ith 2 in|structio|
|00004630| 6e 73 0d 77 68 69 63 68 | 20 77 69 6c 6c 20 62 65 |ns.which| will be|
|00004640| 20 66 61 73 74 65 72 20 | 74 68 61 6e 20 61 20 6d | faster |than a m|
|00004650| 65 6d 6f 72 79 20 72 65 | 66 65 72 65 6e 63 65 2e |emory re|ference.|
|00004660| 0d 0d 42 72 61 6e 63 68 | 65 73 20 77 69 6c 6c 20 |..Branch|es will |
|00004670| 61 6c 77 61 79 73 20 62 | 65 20 73 65 6c 66 2d 72 |always b|e self-r|
|00004680| 65 6c 61 74 69 76 65 2c | 20 61 6e 64 20 74 68 65 |elative,| and the|
|00004690| 79 20 68 61 76 65 20 65 | 6e 6f 75 67 68 20 64 69 |y have e|nough di|
|000046a0| 73 70 6c 61 63 65 6d 65 | 6e 74 0d 62 69 74 73 20 |splaceme|nt.bits |
|000046b0| 74 6f 20 67 65 74 20 75 | 73 20 61 6e 79 77 68 65 |to get u|s anywhe|
|000046c0| 72 65 2e 20 0d 0d 46 6f | 72 20 6f 74 68 65 72 20 |re. ..Fo|r other |
|000046d0| 63 6f 6e 73 74 61 6e 74 | 20 64 61 74 61 2c 20 68 |constant| data, h|
|000046e0| 6f 77 65 76 65 72 2c 20 | 69 74 27 73 20 65 78 74 |owever, |it's ext|
|000046f0| 72 65 6d 65 6c 79 20 68 | 61 6e 64 79 20 74 6f 20 |remely h|andy to |
|00004700| 68 61 76 65 20 61 20 62 | 61 73 65 0d 72 65 67 20 |have a b|ase.reg |
|00004710| 61 76 61 69 6c 61 62 6c | 65 2c 20 65 76 65 6e 20 |availabl|e, even |
|00004720| 69 66 20 74 68 65 73 65 | 20 72 65 66 65 72 65 6e |if these| referen|
|00004730| 63 65 73 20 61 72 65 6e | 27 74 20 70 65 72 66 6f |ces aren|'t perfo|
|00004740| 72 6d 61 6e 63 65 2d 63 | 72 69 74 69 63 61 6c 2e |rmance-c|ritical.|
|00004750| 0d 0d 54 68 75 73 2c 20 | 69 66 20 77 65 20 73 74 |..Thus, |if we st|
|00004760| 69 6c 6c 20 68 61 76 65 | 20 6d 6f 64 75 6c 65 73 |ill have| modules|
|00004770| 20 28 77 68 69 63 68 20 | 69 73 20 73 74 69 6c 6c | (which |is still|
|00004780| 20 75 70 20 66 6f 72 20 | 67 72 61 62 73 29 2c 20 | up for |grabs), |
|00004790| 77 65 27 6c 6c 0d 6e 65 | 65 64 20 34 20 62 61 73 |we'll.ne|ed 4 bas|
|000047a0| 65 20 72 65 67 73 20 2d | 20 32 20 74 6f 20 61 64 |e regs -| 2 to ad|
|000047b0| 64 72 65 73 73 20 63 6f | 64 65 20 61 6e 64 20 32 |dress co|de and 2|
|000047c0| 20 66 6f 72 20 64 61 74 | 61 2e 20 20 4e 6f 74 65 | for dat|a. Note|
|000047d0| 20 74 68 61 74 20 6f 6e | 0d 65 6e 74 72 79 2c 20 | that on|.entry, |
|000047e0| 72 32 20 28 52 54 4f 43 | 29 20 61 6c 77 61 79 73 |r2 (RTOC|) always|
|000047f0| 20 70 6f 69 6e 74 73 20 | 74 6f 20 74 68 65 20 73 | points |to the s|
|00004800| 74 61 72 74 20 6f 66 20 | 74 68 65 20 64 61 74 61 |tart of |the data|
|00004810| 20 61 72 65 61 20 61 73 | 20 64 65 66 69 6e 65 64 | area as| defined|
|00004820| 0d 69 6e 20 74 68 65 20 | 50 45 46 2e 20 20 42 75 |.in the |PEF. Bu|
|00004830| 74 20 77 65 20 63 61 6e | 27 74 20 75 73 65 20 52 |t we can|'t use R|
|00004840| 54 4f 43 20 61 73 20 61 | 20 72 65 67 75 6c 61 72 |TOC as a| regular|
|00004850| 20 62 61 73 65 20 72 65 | 67 2c 20 73 69 6e 63 65 | base re|g, since|
|00004860| 20 69 6e 20 74 68 65 0d | 64 65 76 20 65 6e 76 69 | in the.|dev envi|
|00004870| 72 6f 6e 6d 65 6e 74 20 | 6f 75 72 20 64 61 74 61 |ronment |our data|
|00004880| 20 61 72 65 61 20 77 69 | 6c 6c 20 62 65 20 6f 66 | area wi|ll be of|
|00004890| 66 20 69 6e 20 61 20 73 | 65 70 61 72 61 74 65 20 |f in a s|eparate |
|000048a0| 68 61 6e 64 6c 65 2e 0d | 0d 4f 74 68 65 72 20 72 |handle..|.Other r|
|000048b0| 65 67 73 20 77 65 20 6e | 65 65 64 20 61 72 65 20 |egs we n|eed are |
|000048c0| 52 50 20 28 72 65 74 75 | 72 6e 20 73 74 61 63 6b |RP (retu|rn stack|
|000048d0| 20 70 6f 69 6e 74 65 72 | 29 2c 20 74 68 65 20 6c | pointer|), the l|
|000048e0| 6f 6f 70 20 76 61 72 69 | 61 62 6c 65 20 49 2c 0d |oop vari|able I,.|
|000048f0| 61 6e 64 20 74 68 65 20 | 62 61 73 65 20 61 64 64 |and the |base add|
|00004900| 72 65 73 73 20 6f 66 20 | 74 68 65 20 63 75 72 72 |ress of |the curr|
|00004910| 65 6e 74 20 6f 62 6a 65 | 63 74 2e 20 20 4e 6f 77 |ent obje|ct. Now|
|00004920| 20 77 65 20 6d 61 79 20 | 61 73 20 77 65 6c 6c 20 | we may |as well |
|00004930| 75 73 65 20 6f 6e 65 20 | 6f 66 0d 6f 75 72 20 22 |use one |of.our "|
|00004940| 6c 6f 63 61 6c 22 20 72 | 65 67 69 73 74 65 72 73 |local" r|egisters|
|00004950| 20 66 6f 72 20 49 2c 20 | 73 69 6e 63 65 20 69 74 | for I, |since it|
|00004960| 20 77 69 6c 6c 20 62 65 | 20 76 65 72 79 20 72 61 | will be| very ra|
|00004970| 72 65 20 66 6f 72 20 75 | 73 20 74 6f 20 6e 65 65 |re for u|s to nee|
|00004980| 64 0d 61 6c 6c 20 6f 66 | 20 74 68 65 6d 2e 20 20 |d.all of| them. |
|00004990| 54 68 69 73 20 77 69 6c | 6c 20 6d 65 61 6e 20 6f |This wil|l mean o|
|000049a0| 6e 65 20 6c 65 73 73 20 | 6c 6f 63 61 6c 20 69 6e |ne less |local in|
|000049b0| 20 64 65 66 69 6e 69 74 | 69 6f 6e 73 20 74 68 61 | definit|ions tha|
|000049c0| 74 20 75 73 65 20 49 2c | 0d 62 75 74 20 74 68 61 |t use I,|.but tha|
|000049d0| 74 27 73 20 6e 6f 74 20 | 61 20 70 72 6f 62 6c 65 |t's not |a proble|
|000049e0| 6d 2e 0d 0d 49 74 20 73 | 65 65 6d 73 20 77 65 20 |m...It s|eems we |
|000049f0| 73 68 6f 75 6c 64 20 67 | 6f 20 66 6f 72 20 61 20 |should g|o for a |
|00004a00| 73 65 70 61 72 61 74 65 | 20 46 50 20 73 74 61 63 |separate| FP stac|
|00004a10| 6b 2c 20 73 69 6e 63 65 | 20 74 68 65 20 53 63 69 |k, since| the Sci|
|00004a20| 65 6e 74 69 66 69 63 0d | 4c 69 62 72 61 72 79 20 |entific.|Library |
|00004a30| 69 73 20 6e 6f 77 20 75 | 73 69 6e 67 20 74 68 69 |is now u|sing thi|
|00004a40| 73 2e 20 20 54 68 69 73 | 20 77 69 6c 6c 20 61 6c |s. This| will al|
|00004a50| 73 6f 20 67 69 76 65 20 | 62 65 74 74 65 72 20 63 |so give |better c|
|00004a60| 6f 64 65 20 6f 6e 20 74 | 68 65 20 50 50 43 2c 20 |ode on t|he PPC, |
|00004a70| 73 69 6e 63 65 0d 77 68 | 65 6e 20 77 65 20 62 72 |since.wh|en we br|
|00004a80| 69 6e 67 20 73 74 61 63 | 6b 20 63 65 6c 6c 73 20 |ing stac|k cells |
|00004a90| 62 61 63 6b 20 66 72 6f | 6d 20 6d 65 6d 20 74 6f |back fro|m mem to|
|00004aa0| 20 72 65 67 73 2c 20 77 | 65 27 6c 6c 20 61 6c 77 | regs, w|e'll alw|
|00004ab0| 61 79 73 20 6b 6e 6f 77 | 20 77 68 69 63 68 20 72 |ays know| which r|
|00004ac0| 65 67 73 0d 74 6f 20 6d | 6f 76 65 20 74 68 65 6d |egs.to m|ove them|
|00004ad0| 20 74 6f 2e 20 20 54 68 | 65 20 66 6c 6f 61 74 69 | to. Th|e floati|
|00004ae0| 6e 67 20 73 74 61 63 6b | 20 70 6f 69 6e 74 65 72 |ng stack| pointer|
|00004af0| 20 70 72 6f 62 61 62 6c | 79 20 73 68 6f 75 6c 64 | probabl|y should|
|00004b00| 20 62 65 20 69 6e 20 61 | 0d 72 65 67 69 73 74 65 | be in a|.registe|
|00004b10| 72 2e 0d 0d 53 6f 20 69 | 6e 20 61 6c 6c 20 77 65 |r...So i|n all we|
|00004b20| 27 6c 6c 20 6e 65 65 64 | 20 37 20 73 70 65 63 69 |'ll need| 7 speci|
|00004b30| 61 6c 20 72 65 67 73 20 | 6f 75 74 20 6f 66 20 74 |al regs |out of t|
|00004b40| 68 65 20 6e 6f 6e 2d 76 | 6f 6c 61 74 69 6c 65 20 |he non-v|olatile |
|00004b50| 62 6c 6f 63 6b 2e 0d 0d | 54 68 69 73 20 6c 65 61 |block...|This lea|
|00004b60| 76 65 73 20 72 31 39 2d | 72 33 31 20 66 6f 72 20 |ves r19-|r31 for |
|00004b70| 6c 6f 63 61 6c 73 2c 20 | 77 68 69 63 68 20 6d 65 |locals, |which me|
|00004b80| 61 6e 73 20 74 68 61 74 | 20 69 66 20 77 65 20 6c |ans that| if we l|
|00004b90| 69 6d 69 74 20 74 68 65 | 20 6e 75 6d 62 65 72 0d |imit the| number.|
|00004ba0| 6f 66 20 6c 6f 63 61 6c | 73 20 74 6f 20 31 33 2c |of local|s to 13,|
|00004bb0| 20 77 65 20 63 61 6e 20 | 6b 65 65 70 20 74 68 65 | we can |keep the|
|00004bc0| 6d 20 61 6c 6c 20 69 6e | 20 72 65 67 69 73 74 65 |m all in| registe|
|00004bd0| 72 73 2e 20 20 54 68 69 | 73 20 6c 6f 6f 6b 73 20 |rs. Thi|s looks |
|00004be0| 72 65 61 73 6f 6e 61 62 | 6c 65 2e 0d 0d 0d 53 6f |reasonab|le....So|
|00004bf0| 6d 65 20 6e 6f 74 65 73 | 20 6f 6e 20 72 65 67 69 |me notes| on regi|
|00004c00| 73 74 65 72 20 68 61 6e | 64 6c 69 6e 67 20 61 63 |ster han|dling ac|
|00004c10| 72 6f 73 73 20 69 6e 74 | 65 72 6e 61 6c 20 4d 6f |ross int|ernal Mo|
|00004c20| 70 73 20 63 61 6c 6c 73 | 3a 0d 53 61 76 69 6e 67 |ps calls|:.Saving|
|00004c30| 20 61 6e 64 20 72 65 73 | 74 6f 72 69 6e 67 20 6c | and res|toring l|
|00004c40| 6f 63 61 6c 20 72 65 67 | 73 20 63 61 6e 20 62 65 |ocal reg|s can be|
|00004c50| 20 61 20 62 69 74 20 6c | 6f 6e 67 2d 77 69 6e 64 | a bit l|ong-wind|
|00004c60| 65 64 2c 20 73 6f 20 74 | 6f 20 73 61 76 65 0d 73 |ed, so t|o save.s|
|00004c70| 70 61 63 65 20 77 65 20 | 73 68 6f 75 6c 64 20 6e |pace we |should n|
|00004c80| 6f 72 6d 61 6c 6c 79 20 | 64 6f 20 77 68 61 74 20 |ormally |do what |
|00004c90| 77 65 20 64 6f 20 6f 6e | 20 74 68 65 20 36 38 6b |we do on| the 68k|
|00004ca0| 20 2d 20 74 68 61 74 20 | 69 73 2c 20 61 74 20 74 | - that |is, at t|
|00004cb0| 68 65 0d 73 74 61 72 74 | 20 6f 66 20 65 61 63 68 |he.start| of each|
|00004cc0| 20 64 65 66 6e 2c 20 73 | 61 76 65 20 77 68 61 74 | defn, s|ave what|
|00004cd0| 65 76 65 72 20 72 65 67 | 73 20 77 65 20 6e 65 65 |ever reg|s we nee|
|00004ce0| 64 20 66 6f 72 20 6c 6f | 63 61 6c 73 2c 20 61 6e |d for lo|cals, an|
|00004cf0| 64 20 72 65 73 74 6f 72 | 65 0d 74 68 65 6d 20 61 |d restor|e.them a|
|00004d00| 74 20 74 68 65 20 65 6e | 64 2e 20 20 46 6f 72 20 |t the en|d. For |
|00004d10| 45 58 49 54 2c 20 69 6e | 73 74 65 61 64 20 6f 66 |EXIT, in|stead of|
|00004d20| 20 64 6f 69 6e 67 20 65 | 76 65 72 79 74 68 69 6e | doing e|verythin|
|00004d30| 67 20 69 6e 6c 69 6e 65 | 20 61 73 20 77 65 0d 64 |g inline| as we.d|
|00004d40| 69 64 20 6f 6e 20 74 68 | 65 20 36 38 6b 2c 20 77 |id on th|e 68k, w|
|00004d50| 65 27 6c 6c 20 64 6f 20 | 61 20 62 72 61 6e 63 68 |e'll do |a branch|
|00004d60| 20 74 6f 20 74 68 65 20 | 73 65 6d 69 63 6f 6c 6f | to the |semicolo|
|00004d70| 6e 2e 20 20 54 68 69 73 | 20 69 73 20 61 6c 6d 6f |n. This| is almo|
|00004d80| 73 74 20 61 73 0d 66 61 | 73 74 20 28 65 73 70 2e |st as.fa|st (esp.|
|00004d90| 20 61 73 20 69 74 27 73 | 20 61 6e 20 75 6e 63 6f | as it's| an unco|
|00004da0| 6e 64 69 74 69 6f 6e 61 | 6c 20 62 72 61 6e 63 68 |nditiona|l branch|
|00004db0| 29 2c 20 61 6e 64 20 73 | 61 76 65 73 20 73 70 61 |), and s|aves spa|
|00004dc0| 63 65 2e 0d 0d 57 65 27 | 6c 6c 20 70 72 6f 62 61 |ce...We'|ll proba|
|00004dd0| 62 6c 79 20 6d 61 6b 65 | 20 61 6e 20 65 78 63 65 |bly make| an exce|
|00004de0| 70 74 69 6f 6e 20 66 6f | 72 20 6c 65 61 66 20 70 |ption fo|r leaf p|
|00004df0| 72 6f 63 73 2c 20 73 69 | 6e 63 65 20 74 68 65 73 |rocs, si|nce thes|
|00004e00| 65 20 67 65 74 20 65 78 | 65 63 75 74 65 64 0d 73 |e get ex|ecuted.s|
|00004e10| 6f 20 66 72 65 71 75 65 | 6e 74 6c 79 2e 20 20 57 |o freque|ntly. W|
|00004e20| 68 61 74 20 49 27 6d 20 | 63 75 72 72 65 6e 74 6c |hat I'm |currentl|
|00004e30| 79 20 70 6c 61 6e 6e 69 | 6e 67 2c 20 69 6e 20 74 |y planni|ng, in t|
|00004e40| 68 65 20 63 61 73 65 20 | 77 68 65 72 65 20 74 68 |he case |where th|
|00004e50| 65 20 6c 65 61 66 0d 70 | 72 6f 63 20 68 61 73 20 |e leaf.p|roc has |
|00004e60| 6e 61 6d 65 64 20 70 61 | 72 6d 73 2f 6c 6f 63 61 |named pa|rms/loca|
|00004e70| 6c 73 2c 20 69 73 20 74 | 6f 20 64 6f 20 74 68 65 |ls, is t|o do the|
|00004e80| 20 68 6f 75 73 6b 65 65 | 70 69 6e 67 20 69 6e 20 | houskee|ping in |
|00004e90| 74 68 65 20 63 61 6c 6c | 69 6e 67 0d 72 6f 75 74 |the call|ing.rout|
|00004ea0| 69 6e 65 20 69 6e 73 74 | 65 61 64 20 6f 66 20 69 |ine inst|ead of i|
|00004eb0| 6e 20 74 68 65 20 63 61 | 6c 6c 65 64 20 6c 65 61 |n the ca|lled lea|
|00004ec0| 66 20 70 72 6f 63 2e 20 | 20 54 68 69 73 20 77 69 |f proc. | This wi|
|00004ed0| 6c 6c 20 67 69 76 65 20 | 6d 65 20 74 68 65 0d 70 |ll give |me the.p|
|00004ee0| 6f 73 73 69 62 69 6c 69 | 74 79 20 6f 66 20 67 65 |ossibili|ty of ge|
|00004ef0| 6e 65 72 61 74 69 6e 67 | 20 74 68 65 20 70 61 72 |nerating| the par|
|00004f00| 6d 73 20 73 74 72 61 69 | 67 68 74 20 69 6e 20 74 |ms strai|ght in t|
|00004f10| 68 65 20 72 65 71 75 69 | 72 65 64 20 72 65 67 73 |he requi|red regs|
|00004f20| 2e 0d 41 6c 73 6f 20 49 | 20 6d 69 67 68 74 20 62 |..Also I| might b|
|00004f30| 65 20 61 62 6c 65 20 74 | 6f 20 64 6f 20 74 68 65 |e able t|o do the|
|00004f40| 20 73 61 76 69 6e 67 20 | 61 6e 64 20 72 65 73 74 | saving |and rest|
|00004f50| 6f 72 69 6e 67 20 6f 66 | 20 74 68 65 20 6e 65 65 |oring of| the nee|
|00004f60| 64 65 64 20 72 65 67 73 | 0d 61 74 20 74 68 65 20 |ded regs|.at the |
|00004f70| 62 65 67 69 6e 6e 69 6e | 67 20 61 6e 64 20 65 6e |beginnin|g and en|
|00004f80| 64 20 6f 66 20 74 68 65 | 20 63 61 6c 6c 69 6e 67 |d of the| calling|
|00004f90| 20 72 6f 75 74 69 6e 65 | 20 28 64 65 70 65 6e 64 | routine| (depend|
|00004fa0| 69 6e 67 20 6f 6e 20 77 | 68 61 74 0d 70 61 72 6d |ing on w|hat.parm|
|00004fb0| 73 2f 6c 6f 63 61 6c 73 | 20 74 68 61 74 20 72 6f |s/locals| that ro|
|00004fc0| 75 74 69 6e 65 20 6d 69 | 67 68 74 20 6e 65 65 64 |utine mi|ght need|
|00004fd0| 2e 20 20 54 68 69 73 20 | 77 6f 75 6c 64 20 67 65 |. This |would ge|
|00004fe0| 74 20 74 68 65 73 65 20 | 68 6f 75 73 65 6b 65 65 |t these |housekee|
|00004ff0| 70 69 6e 67 0d 6f 70 65 | 72 61 74 69 6f 6e 73 20 |ping.ope|rations |
|00005000| 6f 75 74 20 6f 66 20 61 | 6e 79 20 69 6e 6e 65 72 |out of a|ny inner|
|00005010| 20 6c 6f 6f 70 73 2e 0d | 0d 54 68 69 73 20 61 6c | loops..|.This al|
|00005020| 74 65 72 6e 61 74 69 76 | 65 20 63 61 6c 6c 69 6e |ternativ|e callin|
|00005030| 67 20 63 6f 6e 76 65 6e | 74 69 6f 6e 20 73 68 6f |g conven|tion sho|
|00005040| 75 6c 64 20 63 65 72 74 | 61 69 6e 6c 79 20 62 65 |uld cert|ainly be|
|00005050| 20 66 61 73 74 65 72 2c | 20 62 75 74 20 77 69 6c | faster,| but wil|
|00005060| 6c 0d 74 61 6b 65 20 61 | 20 6c 6f 74 20 6d 6f 72 |l.take a| lot mor|
|00005070| 65 20 73 70 61 63 65 2c | 20 73 6f 20 49 20 77 6f |e space,| so I wo|
|00005080| 6e 27 74 20 64 6f 20 69 | 74 20 61 6c 6c 20 74 68 |n't do i|t all th|
|00005090| 65 20 74 69 6d 65 2e 0d | 0d 0d 0d 0d 0d 54 68 65 |e time..|.....The|
|000050a0| 20 32 20 66 6c 61 67 20 | 62 79 74 65 73 20 61 72 | 2 flag |bytes ar|
|000050b0| 65 20 6f 72 67 61 6e 69 | 7a 65 64 20 61 73 20 34 |e organi|zed as 4|
|000050c0| 20 6e 79 62 62 6c 65 73 | 3a 0d 0d 6e 79 62 62 6c | nybbles|:..nybbl|
|000050d0| 65 20 30 3a 09 62 69 74 | 20 30 3a 09 31 20 69 66 |e 0:.bit| 0:.1 if|
|000050e0| 20 69 74 27 73 20 61 20 | 6c 65 61 66 20 64 65 66 | it's a |leaf def|
|000050f0| 6e 0d 09 09 09 62 69 74 | 20 31 3a 09 31 20 69 66 |n....bit| 1:.1 if|
|00005100| 20 69 74 20 61 6c 74 65 | 72 73 20 74 68 65 20 63 | it alte|rs the c|
|00005110| 6f 75 6e 74 20 72 65 67 | 69 73 74 65 72 0d 09 09 |ount reg|ister...|
|00005120| 09 62 69 74 20 32 3a 09 | 73 70 61 72 65 0d 09 09 |.bit 2:.|spare...|
|00005130| 09 62 69 74 20 33 3a 09 | 31 20 69 66 20 69 74 20 |.bit 3:.|1 if it |
|00005140| 61 6c 74 65 72 73 20 74 | 68 65 20 46 50 20 6f 72 |alters t|he FP or|
|00005150| 20 76 65 63 74 6f 72 20 | 72 65 67 73 2e 0d 0d 6e | vector |regs...n|
|00005160| 79 62 62 6c 65 20 31 3a | 09 6e 75 6d 62 65 72 20 |ybble 1:|.number |
|00005170| 6f 66 20 72 65 73 75 6c | 74 73 20 69 6e 20 72 65 |of resul|ts in re|
|00005180| 67 69 73 74 65 72 73 20 | 6f 6e 20 65 78 69 74 0d |gisters |on exit.|
|00005190| 6e 79 62 62 6c 65 20 32 | 3a 09 6e 75 6d 62 65 72 |nybble 2|:.number|
|000051a0| 20 6f 66 20 6e 61 6d 65 | 64 20 70 61 72 61 6d 65 | of name|d parame|
|000051b0| 74 65 72 73 0d 6e 79 62 | 62 6c 65 20 33 3a 09 6e |ters.nyb|ble 3:.n|
|000051c0| 75 6d 62 65 72 20 6f 66 | 20 6e 61 6d 65 64 20 70 |umber of| named p|
|000051d0| 61 72 6d 73 20 2b 20 6c | 6f 63 61 6c 73 0d 09 09 |arms + l|ocals...|
|000051e0| 09 09 28 64 6f 69 6e 67 | 20 69 74 20 74 68 69 73 |..(doing| it this|
|000051f0| 20 77 61 79 20 69 73 20 | 61 20 62 69 74 20 6d 6f | way is |a bit mo|
|00005200| 72 65 20 63 6f 6e 76 65 | 6e 69 65 6e 74 2c 20 61 |re conve|nient, a|
|00005210| 6e 64 20 74 68 65 0d 09 | 09 09 09 20 6d 61 78 20 |nd the..|... max |
|00005220| 6e 75 6d 62 65 72 20 6f | 66 20 70 61 72 6d 73 2b |number o|f parms+|
|00005230| 6c 6f 63 61 6c 73 20 69 | 73 20 6f 6e 6c 79 20 31 |locals i|s only 1|
|00005240| 31 2c 20 73 6f 20 77 65 | 20 68 61 76 65 0d 09 09 |1, so we| have...|
|00005250| 09 09 20 65 6e 6f 75 67 | 68 20 62 69 74 73 29 0d |.. enoug|h bits).|
|00005260| 0d 49 66 20 74 68 65 20 | 64 65 66 69 6e 69 74 69 |.If the |definiti|
|00005270| 6f 6e 20 64 6f 65 73 20 | 61 6e 79 20 66 6c 6f 61 |on does |any floa|
|00005280| 74 69 6e 67 20 70 6f 69 | 6e 74 20 6f 72 20 41 6c |ting poi|nt or Al|
|00005290| 74 69 56 65 63 20 6f 70 | 65 72 61 74 69 6f 6e 73 |tiVec op|erations|
|000052a0| 2c 20 6f 72 20 0d 61 6e | 79 74 68 69 6e 67 20 74 |, or .an|ything t|
|000052b0| 68 61 74 20 61 6c 74 65 | 72 73 20 74 68 65 20 46 |hat alte|rs the F|
|000052c0| 50 20 6f 72 20 76 65 63 | 74 6f 72 20 72 65 67 69 |P or vec|tor regi|
|000052d0| 73 74 65 72 73 2c 20 77 | 65 20 6e 65 65 64 20 6d |sters, w|e need m|
|000052e0| 6f 72 65 20 66 6c 61 67 | 73 2c 20 0d 73 6f 20 77 |ore flag|s, .so w|
|000052f0| 65 20 61 64 64 20 61 6e | 20 65 78 74 72 61 20 33 |e add an| extra 3|
|00005300| 32 20 62 69 74 73 2e 20 | 20 46 6f 72 20 61 6c 69 |2 bits. | For ali|
|00005310| 67 6e 6d 65 6e 74 2c 20 | 77 65 20 68 61 76 65 20 |gnment, |we have |
|00005320| 74 6f 20 74 61 6b 65 20 | 61 74 20 6c 65 61 73 74 |to take |at least|
|00005330| 20 0d 33 32 2c 20 73 6f | 20 77 65 20 6d 69 67 68 | .32, so| we migh|
|00005340| 74 20 61 73 20 77 65 6c | 6c 20 6d 61 6b 65 20 74 |t as wel|l make t|
|00005350| 68 65 20 6d 6f 73 74 20 | 6f 66 20 69 74 2e 0d 0d |he most |of it...|
|00005360| 62 79 74 65 20 30 3a 09 | 09 24 20 42 42 20 2d 20 |byte 0:.|.$ BB - |
|00005370| 74 68 69 73 20 69 73 20 | 62 61 73 69 63 61 6c 6c |this is |basicall|
|00005380| 79 20 6a 75 73 74 20 66 | 6f 72 20 74 68 65 20 64 |y just f|or the d|
|00005390| 69 73 61 73 73 65 6d 62 | 6c 65 72 2e 0d 62 79 74 |isassemb|ler..byt|
|000053a0| 65 20 31 3a 09 09 28 69 | 66 20 77 65 20 65 6e 64 |e 1:..(i|f we end|
|000053b0| 20 75 70 20 77 69 74 68 | 20 61 20 76 65 63 74 6f | up with| a vecto|
|000053c0| 72 20 73 74 61 63 6b 2c | 20 77 65 20 6d 69 67 68 |r stack,| we migh|
|000053d0| 74 0d 09 09 09 20 75 73 | 65 20 62 79 74 65 73 20 |t.... us|e bytes |
|000053e0| 30 20 61 6e 64 20 31 20 | 61 73 20 34 20 6e 79 62 |0 and 1 |as 4 nyb|
|000053f0| 62 6c 65 73 20 61 73 20 | 66 6f 72 20 66 6c 6f 61 |bles as |for floa|
|00005400| 74 73 2e 29 0d 0d 62 79 | 74 65 73 20 32 20 61 6e |ts.)..by|tes 2 an|
|00005410| 64 20 33 20 61 72 65 20 | 34 20 6e 79 62 62 6c 65 |d 3 are |4 nybble|
|00005420| 73 3a 0d 0d 6e 79 62 62 | 6c 65 20 30 3a 0d 6e 79 |s:..nybb|le 0:.ny|
|00005430| 62 62 6c 65 20 31 3a 09 | 6e 75 6d 62 65 72 20 6f |bble 1:.|number o|
|00005440| 66 20 66 6c 6f 61 74 69 | 6e 67 20 72 65 73 75 6c |f floati|ng resul|
|00005450| 74 73 20 69 6e 20 72 65 | 67 69 73 74 65 72 73 20 |ts in re|gisters |
|00005460| 6f 6e 20 65 78 69 74 0d | 6e 79 62 62 6c 65 20 32 |on exit.|nybble 2|
|00005470| 3a 09 6e 75 6d 62 65 72 | 20 6f 66 20 6e 61 6d 65 |:.number| of name|
|00005480| 64 20 66 6c 6f 61 74 69 | 6e 67 20 70 61 72 61 6d |d floati|ng param|
|00005490| 65 74 65 72 73 0d 6e 79 | 62 62 6c 65 20 33 3a 09 |eters.ny|bble 3:.|
|000054a0| 6e 75 6d 62 65 72 20 6f | 66 20 6e 61 6d 65 64 20 |number o|f named |
|000054b0| 66 6c 6f 61 74 69 6e 67 | 20 70 61 72 6d 73 20 2b |floating| parms +|
|000054c0| 20 6c 6f 63 61 6c 73 0d | 0d 0d 0d 09 3d 3d 3d 3d | locals.|....====|
|000054d0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 20 46 49 4e 41 |========|=== FINA|
|000054e0| 4c 49 5a 41 54 49 4f 4e | 20 4f 46 20 44 45 46 49 |LIZATION| OF DEFI|
|000054f0| 4e 49 54 49 4f 4e 53 20 | 3d 3d 3d 3d 3d 3d 3d 3d |NITIONS |========|
|00005500| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 0d 0d 41 74 20 73 65 |========|=..At se|
|00005510| 6d 69 63 6f 6c 6f 6e 20 | 74 69 6d 65 2c 20 74 68 |micolon |time, th|
|00005520| 65 72 65 20 61 72 65 20 | 61 20 6e 75 6d 62 65 72 |ere are |a number|
|00005530| 20 6f 66 20 74 68 69 6e | 67 73 20 77 65 20 68 61 | of thin|gs we ha|
|00005540| 76 65 20 74 6f 20 66 69 | 78 20 75 70 20 69 6e 0d |ve to fi|x up in.|
|00005550| 74 68 65 20 64 65 66 69 | 6e 69 74 69 6f 6e 20 77 |the defi|nition w|
|00005560| 65 20 6a 75 73 74 20 63 | 6f 6d 70 69 6c 65 64 2e |e just c|ompiled.|
|00005570| 20 20 4f 6e 63 65 20 77 | 65 27 76 65 20 63 6f 6d | Once w|e've com|
|00005580| 70 69 6c 65 64 20 74 68 | 65 20 70 72 6f 6c 6f 67 |piled th|e prolog|
|00005590| 20 61 6e 64 0d 65 70 69 | 6c 6f 67 20 61 6e 64 20 | and.epi|log and |
|000055a0| 61 64 64 65 64 20 74 68 | 65 20 63 6f 6e 73 74 5f |added th|e const_|
|000055b0| 64 61 74 61 2c 20 69 66 | 20 61 6e 79 2c 20 74 68 |data, if| any, th|
|000055c0| 65 20 66 69 6e 61 6c 20 | 6c 6f 63 61 74 69 6f 6e |e final |location|
|000055d0| 20 6f 66 20 74 68 65 20 | 0d 63 6f 64 65 20 69 73 | of the |.code is|
|000055e0| 20 6b 6e 6f 77 6e 2e 20 | 20 57 65 20 63 61 6e 20 | known. | We can |
|000055f0| 74 68 65 6e 20 22 66 69 | 6e 61 6c 69 7a 65 22 20 |then "fi|nalize" |
|00005600| 74 68 65 20 64 65 66 69 | 6e 69 74 69 6f 6e 2e 20 |the defi|nition. |
|00005610| 20 54 68 69 73 20 69 6e | 63 6c 75 64 65 73 0d 72 | This in|cludes.r|
|00005620| 65 73 6f 6c 76 69 6e 67 | 20 61 6e 79 20 45 58 49 |esolving| any EXI|
|00005630| 54 73 20 61 6e 64 20 4c | 45 41 56 45 73 20 61 6e |Ts and L|EAVEs an|
|00005640| 64 20 70 75 74 74 69 6e | 67 20 69 6e 20 74 68 65 |d puttin|g in the|
|00005650| 20 63 6f 72 72 65 63 74 | 20 6f 66 66 73 65 74 73 | correct| offsets|
|00005660| 20 66 6f 72 0d 63 61 6c | 6c 73 20 74 6f 20 6f 74 | for.cal|ls to ot|
|00005670| 68 65 72 20 77 6f 72 64 | 73 20 28 74 68 65 73 65 |her word|s (these|
|00005680| 20 63 6f 75 6c 64 6e 27 | 74 20 62 65 20 64 65 74 | couldn'|t be det|
|00005690| 65 72 6d 69 6e 65 64 20 | 62 65 66 6f 72 65 20 74 |ermined |before t|
|000056a0| 68 65 20 63 6f 64 65 27 | 73 0d 66 69 6e 61 6c 20 |he code'|s.final |
|000056b0| 6c 6f 63 61 74 69 6f 6e | 20 77 61 73 20 64 65 74 |location| was det|
|000056c0| 65 72 6d 69 6e 65 64 29 | 2e 0d 0d 54 6f 20 68 61 |ermined)|...To ha|
|000056d0| 6e 64 6c 65 20 74 68 65 | 73 65 20 76 61 72 69 6f |ndle the|se vario|
|000056e0| 75 73 20 74 68 69 6e 67 | 73 2c 20 77 65 20 75 73 |us thing|s, we us|
|000056f0| 65 20 73 6f 6d 65 20 70 | 73 65 75 64 6f 2d 69 6e |e some p|seudo-in|
|00005700| 73 74 72 75 63 74 69 6f | 6e 73 20 74 6f 20 73 74 |structio|ns to st|
|00005710| 61 6e 64 20 69 6e 0d 70 | 6c 61 63 65 20 6f 66 20 |and in.p|lace of |
|00005720| 74 68 65 20 66 69 6e 61 | 6c 20 69 6e 73 74 72 75 |the fina|l instru|
|00005730| 63 74 69 6f 6e 73 20 77 | 65 27 72 65 20 67 6f 69 |ctions w|e're goi|
|00005740| 6e 67 20 74 6f 20 70 75 | 74 20 69 6e 20 74 68 6f |ng to pu|t in tho|
|00005750| 73 65 20 73 61 6d 65 20 | 6c 6f 63 61 74 69 6f 6e |se same |location|
|00005760| 73 0d 61 74 20 66 69 6e | 61 6c 69 7a 61 74 69 6f |s.at fin|alizatio|
|00005770| 6e 20 74 69 6d 65 2e 20 | 20 54 6f 20 66 69 6e 61 |n time. | To fina|
|00005780| 6c 69 7a 65 2c 20 77 65 | 20 6c 6f 6f 6b 20 74 68 |lize, we| look th|
|00005790| 72 6f 75 67 68 20 74 68 | 65 20 77 68 6f 6c 65 20 |rough th|e whole |
|000057a0| 64 65 66 69 6e 69 74 69 | 6f 6e 0d 66 6f 72 20 74 |definiti|on.for t|
|000057b0| 68 65 73 65 20 70 73 65 | 75 64 6f 2d 69 6e 73 74 |hese pse|udo-inst|
|000057c0| 72 75 63 74 69 6f 6e 73 | 2c 20 61 6e 64 20 74 61 |ructions|, and ta|
|000057d0| 6b 65 20 74 68 65 20 61 | 70 70 72 6f 70 72 69 61 |ke the a|ppropria|
|000057e0| 74 65 20 61 63 74 69 6f | 6e 2e 0d 0d 46 6f 72 20 |te actio|n...For |
|000057f0| 74 68 65 20 70 73 65 75 | 64 6f 2d 69 6e 73 74 72 |the pseu|do-instr|
|00005800| 75 63 74 69 6f 6e 73 2c | 20 77 65 20 68 61 76 65 |uctions,| we have|
|00005810| 20 74 6f 20 75 73 65 20 | 6f 70 63 6f 64 65 73 20 | to use |opcodes |
|00005820| 74 68 61 74 20 63 61 6e | 27 74 20 65 76 65 72 20 |that can|'t ever |
|00005830| 62 65 0d 75 73 65 64 20 | 66 6f 72 20 72 65 61 6c |be.used |for real|
|00005840| 20 69 6e 73 74 72 75 63 | 74 69 6f 6e 73 2e 20 20 | instruc|tions. |
|00005850| 4e 6f 77 20 77 65 27 6c | 6c 20 6e 65 76 65 72 20 |Now we'l|l never |
|00005860| 75 73 65 20 74 68 65 20 | 6c 6d 77 20 61 6e 64 20 |use the |lmw and |
|00005870| 73 74 6d 77 20 0d 69 6e | 73 74 72 75 63 74 69 6f |stmw .in|structio|
|00005880| 6e 73 2c 20 73 69 6e 63 | 65 20 4b 65 69 74 68 20 |ns, sinc|e Keith |
|00005890| 44 20 68 61 73 20 77 61 | 72 6e 65 64 20 6d 65 20 |D has wa|rned me |
|000058a0| 74 68 61 74 20 74 68 65 | 79 27 6c 6c 20 67 6f 20 |that the|y'll go |
|000058b0| 61 77 61 79 20 69 6e 0d | 66 75 74 75 72 65 21 20 |away in.|future! |
|000058c0| 20 54 68 69 73 20 6d 65 | 61 6e 73 20 74 68 61 74 | This me|ans that|
|000058d0| 20 77 65 20 63 61 6e 20 | 75 73 65 20 74 68 65 69 | we can |use thei|
|000058e0| 72 20 76 61 6c 75 65 73 | 20 61 73 20 70 73 65 75 |r values| as pseu|
|000058f0| 64 6f 2d 6f 70 63 6f 64 | 65 73 2c 0d 73 69 6e 63 |do-opcod|es,.sinc|
|00005900| 65 20 77 65 20 6b 6e 6f | 77 20 74 68 61 74 20 4d |e we kno|w that M|
|00005910| 6f 70 73 20 77 69 6c 6c | 20 6e 65 76 65 72 20 67 |ops will| never g|
|00005920| 65 6e 65 72 61 74 65 20 | 74 68 65 6d 20 77 69 74 |enerate |them wit|
|00005930| 68 20 74 68 65 69 72 20 | 70 72 6f 70 65 72 0d 6d |h their |proper.m|
|00005940| 65 61 6e 69 6e 67 2e 0d | 0d 54 68 65 20 76 61 6c |eaning..|.The val|
|00005950| 75 65 73 20 69 6e 20 71 | 75 65 73 74 69 6f 6e 20 |ues in q|uestion |
|00005960| 61 72 65 20 70 72 69 6d | 61 72 79 20 6f 70 63 6f |are prim|ary opco|
|00005970| 64 65 73 20 34 36 20 61 | 6e 64 20 34 37 2c 20 77 |des 46 a|nd 47, w|
|00005980| 68 69 63 68 20 6d 65 61 | 6e 73 0d 24 42 38 78 78 |hich mea|ns.$B8xx|
|00005990| 78 78 78 78 20 74 6f 20 | 24 42 46 78 78 78 78 78 |xxxx to |$BFxxxxx|
|000059a0| 78 2e 20 20 57 65 20 61 | 6c 73 6f 20 64 65 66 69 |x. We a|lso defi|
|000059b0| 6e 65 20 6f 75 72 20 68 | 61 6e 64 6c 65 72 20 63 |ne our h|andler c|
|000059c0| 6f 64 65 73 20 69 6e 74 | 6f 20 74 68 69 73 0d 73 |odes int|o this.s|
|000059d0| 61 6d 65 20 72 61 6e 67 | 65 2c 20 73 69 6e 63 65 |ame rang|e, since|
|000059e0| 20 74 68 65 20 74 77 6f | 2d 62 79 74 65 20 68 61 | the two|-byte ha|
|000059f0| 6e 64 6c 65 72 20 63 6f | 64 65 20 61 70 70 65 61 |ndler co|de appea|
|00005a00| 72 73 20 6f 6e 20 61 6e | 20 61 6c 69 67 6e 65 64 |rs on an| aligned|
|00005a10| 0d 62 6f 75 6e 64 61 72 | 79 2e 20 20 54 68 69 73 |.boundar|y. This|
|00005a20| 20 77 69 6c 6c 20 70 72 | 65 76 65 6e 74 20 61 20 | will pr|event a |
|00005a30| 68 61 6e 64 6c 65 72 20 | 63 6f 64 65 20 65 76 65 |handler |code eve|
|00005a40| 72 20 62 65 69 6e 67 20 | 6d 69 73 74 61 6b 65 6e |r being |mistaken|
|00005a50| 20 66 6f 72 20 61 6e 0d | 69 6e 73 74 72 75 63 74 | for an.|instruct|
|00005a60| 69 6f 6e 2e 20 20 54 68 | 75 73 20 61 6c 6c 20 6f |ion. Th|us all o|
|00005a70| 75 72 20 68 61 6e 64 6c | 65 72 20 63 6f 64 65 73 |ur handl|er codes|
|00005a80| 20 61 6e 64 20 70 73 65 | 75 64 6f 2d 69 6e 73 74 | and pse|udo-inst|
|00005a90| 72 75 63 74 69 6f 6e 73 | 0d 69 64 65 6e 74 69 66 |ructions|.identif|
|00005aa0| 79 20 74 68 65 6d 73 65 | 6c 76 65 73 2c 20 77 68 |y themse|lves, wh|
|00005ab0| 69 63 68 20 67 65 6e 65 | 72 61 6c 6c 79 20 6d 61 |ich gene|rally ma|
|00005ac0| 6b 65 73 20 6c 69 66 65 | 20 65 61 73 69 65 72 2e |kes life| easier.|
|00005ad0| 0d 0d 53 6f 20 66 61 72 | 20 77 65 27 76 65 20 64 |..So far| we've d|
|00005ae0| 65 66 69 6e 65 64 20 74 | 68 65 73 65 3a 0d 0d 42 |efined t|hese:..B|
|00005af0| 41 78 78 20 78 78 78 78 | 09 63 61 6c 6c 20 74 6f |Axx xxxx|.call to|
|00005b00| 20 61 20 4d 6f 70 73 20 | 77 6f 72 64 20 28 78 78 | a Mops |word (xx|
|00005b10| 20 78 78 78 78 20 69 73 | 20 63 6f 64 65 2d 72 65 | xxxx is| code-re|
|00005b20| 6c 61 74 69 76 65 20 6f | 66 66 73 65 74 29 0d 0d |lative o|ffset)..|
|00005b30| 42 42 78 78 20 78 78 78 | 78 09 66 6c 6f 61 74 69 |BBxx xxx|x.floati|
|00005b40| 6e 67 2d 70 6f 69 6e 74 | 2f 41 6c 74 69 56 65 63 |ng-point|/AltiVec|
|00005b50| 20 66 6c 61 67 20 62 79 | 74 65 73 2e 20 20 54 68 | flag by|tes. Th|
|00005b60| 69 73 20 63 6f 64 65 20 | 69 73 20 62 61 73 69 63 |is code |is basic|
|00005b70| 61 6c 6c 79 20 0d 09 09 | 09 66 6f 72 20 74 68 65 |ally ...|.for the|
|00005b80| 20 64 69 73 61 73 73 65 | 6d 62 6c 65 72 2c 20 73 | disasse|mbler, s|
|00005b90| 69 6e 63 65 20 69 74 27 | 73 20 61 6c 69 67 6e 65 |ince it'|s aligne|
|00005ba0| 64 20 61 6e 64 20 33 20 | 66 6c 61 67 20 62 79 74 |d and 3 |flag byt|
|00005bb0| 65 73 0d 20 20 09 09 09 | 09 61 72 65 20 70 6c 65 |es. ...|.are ple|
|00005bc0| 6e 74 79 2e 20 20 49 74 | 20 73 68 6f 75 6c 64 6e |nty. It| shouldn|
|00005bd0| 27 74 20 63 6f 6d 65 20 | 75 70 20 69 6e 20 66 69 |'t come |up in fi|
|00005be0| 6e 61 6c 69 7a 61 74 69 | 6f 6e 2e 0d 0d 42 43 78 |nalizati|on...BCx|
|00005bf0| 78 09 09 61 6c 6c 20 68 | 61 6e 64 6c 65 72 20 63 |x..all h|andler c|
|00005c00| 6f 64 65 73 20 77 68 69 | 63 68 20 68 61 76 65 20 |odes whi|ch have |
|00005c10| 6e 6f 20 62 6f 69 6c 65 | 72 70 6c 61 74 65 20 63 |no boile|rplate c|
|00005c20| 6f 64 65 20 28 63 61 6e | 27 74 0d 09 09 09 62 65 |ode (can|'t....be|
|00005c30| 20 45 58 45 43 55 54 45 | 64 29 2e 20 20 55 6e 6c | EXECUTE|d). Unl|
|00005c40| 69 6b 65 20 6f 6e 20 74 | 68 65 20 36 38 6b 2c 20 |ike on t|he 68k, |
|00005c50| 78 78 20 69 73 20 75 6e | 73 69 67 6e 65 64 20 61 |xx is un|signed a|
|00005c60| 6e 64 20 6e 6f 74 0d 09 | 09 09 64 6f 75 62 6c 65 |nd not..|..double|
|00005c70| 64 20 28 73 6f 20 77 65 | 20 63 61 6e 20 68 61 76 |d (so we| can hav|
|00005c80| 65 20 32 35 36 20 63 6f | 64 65 73 20 69 66 20 77 |e 256 co|des if w|
|00005c90| 65 20 6e 65 65 64 20 74 | 68 65 6d 29 2e 0d 09 09 |e need t|hem)....|
|00005ca0| 09 0d 42 44 78 78 09 09 | 61 6c 6c 20 6f 74 68 65 |..BDxx..|all othe|
|00005cb0| 72 20 68 61 6e 64 6c 65 | 72 20 63 6f 64 65 73 2c |r handle|r codes,|
|00005cc0| 20 65 78 63 65 70 74 20 | 66 6f 72 20 63 6f 6c 6f | except |for colo|
|00005cd0| 6e 20 64 65 66 6e 73 2e | 20 20 54 68 65 79 20 63 |n defns.| They c|
|00005ce0| 61 6e 0d 20 20 09 09 09 | 09 62 65 20 45 58 45 43 |an. ...|.be EXEC|
|00005cf0| 55 54 45 64 2e 0d 0d 42 | 45 30 30 09 09 09 68 61 |UTEd...B|E00...ha|
|00005d00| 6e 64 6c 65 72 20 63 6f | 64 65 20 66 6f 72 20 61 |ndler co|de for a|
|00005d10| 20 63 6f 6c 6f 6e 20 64 | 65 66 6e 0d 42 45 30 31 | colon d|efn.BE01|
|00005d20| 09 09 09 64 69 74 74 6f | 2c 20 62 75 74 20 6d 65 |...ditto|, but me|
|00005d30| 61 6e 73 20 74 68 69 73 | 20 69 73 20 61 20 66 6f |ans this| is a fo|
|00005d40| 72 77 61 72 64 20 64 65 | 66 6e 2e 0d 42 45 30 32 |rward de|fn..BE02|
|00005d50| 09 09 09 6d 61 72 6b 73 | 20 74 68 65 20 73 74 61 |...marks| the sta|
|00005d60| 72 74 20 6f 66 20 3a 6c | 6f 63 20 63 6f 64 65 0d |rt of :l|oc code.|
|00005d70| 42 45 30 33 09 09 09 6d | 61 72 6b 73 20 74 68 65 |BE03...m|arks the|
|00005d80| 20 73 74 61 72 74 20 6f | 66 20 3a 6d 6c 6f 63 20 | start o|f :mloc |
|00005d90| 63 6f 64 65 0d 42 45 30 | 34 09 09 09 68 61 6e 64 |code.BE0|4...hand|
|00005da0| 6c 65 72 20 63 6f 64 65 | 20 66 6f 72 20 61 20 3a |ler code| for a :|
|00005db0| 70 70 63 5f 70 72 6f 63 | 20 64 65 66 6e 0d 42 45 |ppc_proc| defn.BE|
|00005dc0| 30 35 09 09 09 68 61 6e | 64 6c 65 72 20 63 6f 64 |05...han|dler cod|
|00005dd0| 65 20 66 6f 72 20 3a 65 | 6e 74 72 79 0d 0d 42 45 |e for :e|ntry..BE|
|00005de0| 34 30 09 09 09 6d 65 74 | 68 6f 64 20 28 6e 6f 74 |40...met|hod (not|
|00005df0| 65 20 42 44 34 30 20 69 | 73 20 61 6e 20 69 6e 6c |e BD40 i|s an inl|
|00005e00| 69 6e 65 20 6d 65 74 68 | 6f 64 20 2d 20 73 6f 20 |ine meth|od - so |
|00005e10| 74 68 65 20 34 30 20 61 | 6c 77 61 79 73 0d 20 20 |the 40 a|lways. |
|00005e20| 09 09 09 09 09 6d 61 72 | 6b 73 20 61 20 6d 65 74 |.....mar|ks a met|
|00005e30| 68 6f 64 29 0d 0d 09 09 | 28 77 65 27 6c 6c 20 72 |hod)....|(we'll r|
|00005e40| 65 73 65 72 76 65 20 42 | 45 78 78 20 66 6f 72 20 |eserve B|Exx for |
|00005e50| 61 6e 79 20 66 75 72 74 | 68 65 72 20 6f 70 74 69 |any furt|her opti|
|00005e60| 6f 6e 73 20 6f 6e 20 63 | 6f 6c 6f 6e 20 64 65 66 |ons on c|olon def|
|00005e70| 69 6e 69 74 69 6f 6e 73 | 2e 29 0d 20 20 0d 54 68 |initions|.). .Th|
|00005e80| 65 73 65 20 6e 65 78 74 | 20 74 77 6f 20 63 61 6e |ese next| two can|
|00005e90| 27 74 20 65 76 65 72 20 | 61 70 70 65 61 72 20 69 |'t ever |appear i|
|00005ea0| 6e 73 69 64 65 20 61 20 | 64 65 66 69 6e 69 74 69 |nside a |definiti|
|00005eb0| 6f 6e 2c 20 73 6f 20 77 | 65 20 67 69 76 65 20 61 |on, so w|e give a|
|00005ec0| 6e 20 65 72 72 6f 72 0d | 69 66 20 74 68 65 79 27 |n error.|if they'|
|00005ed0| 72 65 20 65 6e 63 6f 75 | 6e 74 65 72 65 64 20 64 |re encou|ntered d|
|00005ee0| 75 72 69 6e 67 20 66 69 | 6e 61 6c 69 7a 61 74 69 |uring fi|nalizati|
|00005ef0| 6f 6e 2e 0d 0d 42 46 30 | 31 09 09 68 61 6e 64 6c |on...BF0|1..handl|
|00005f00| 65 72 20 63 6f 64 65 20 | 66 6f 72 20 53 59 53 43 |er code |for SYSC|
|00005f10| 41 4c 4c 20 61 6e 64 20 | 45 58 54 45 52 4e 0d 42 |ALL and |EXTERN.B|
|00005f20| 46 30 42 09 09 68 61 6e | 64 6c 65 72 20 63 6f 64 |F0B..han|dler cod|
|00005f30| 65 20 66 6f 72 20 4c 49 | 42 52 41 52 59 0d 42 46 |e for LI|BRARY.BF|
|00005f40| 30 43 20 30 30 30 30 09 | 63 61 73 65 2d 73 65 6e |0C 0000.|case-sen|
|00005f50| 73 69 74 69 76 65 20 6e | 61 6d 65 20 66 6f 72 20 |sitive n|ame for |
|00005f60| 3a 45 4e 54 52 59 20 66 | 6f 6c 6c 6f 77 73 0d 0d |:ENTRY f|ollows..|
|00005f70| 42 46 30 32 20 30 30 30 | 30 09 45 58 49 54 0d 42 |BF02 000|0.EXIT.B|
|00005f80| 46 30 33 20 78 78 78 78 | 09 63 6f 6e 64 69 74 69 |F03 xxxx|.conditi|
|00005f90| 6f 6e 61 6c 20 45 58 49 | 54 20 28 78 78 78 78 20 |onal EXI|T (xxxx |
|00005fa0| 69 73 20 63 6f 6e 64 2e | 20 62 72 61 6e 63 68 20 |is cond.| branch |
|00005fb0| 6f 70 63 6f 64 65 29 0d | 42 46 30 34 20 30 30 30 |opcode).|BF04 000|
|00005fc0| 30 09 4c 45 41 56 45 0d | 42 46 30 35 20 30 30 30 |0.LEAVE.|BF05 000|
|00005fd0| 30 09 4c 4f 4f 50 0d 42 | 46 30 36 20 30 30 30 30 |0.LOOP.B|F06 0000|
|00005fe0| 09 74 61 72 67 65 74 20 | 6f 66 20 61 20 66 6f 72 |.target |of a for|
|00005ff0| 77 61 72 64 20 64 65 66 | 6e 2e 20 20 54 68 69 73 |ward def|n. This|
|00006000| 20 6d 61 72 6b 65 72 20 | 69 73 20 72 65 64 75 6e | marker |is redun|
|00006010| 64 61 6e 74 2c 0d 09 09 | 09 09 62 75 74 20 6d 61 |dant,...|..but ma|
|00006020| 6b 65 73 20 74 68 65 20 | 64 65 63 6f 6d 70 69 6c |kes the |decompil|
|00006030| 65 72 20 6f 75 74 70 75 | 74 20 6c 6f 6f 6b 20 6d |er outpu|t look m|
|00006040| 6f 72 65 20 73 65 6e 73 | 69 62 6c 65 2e 0d 0d 42 |ore sens|ible...B|
|00006050| 46 30 38 20 78 78 78 78 | 09 75 6e 63 6f 6e 64 69 |F08 xxxx|.uncondi|
|00006060| 74 69 6f 6e 61 6c 20 62 | 72 61 6e 63 68 2e 20 20 |tional b|ranch. |
|00006070| 78 78 78 78 20 69 73 20 | 6f 66 66 73 65 74 20 28 |xxxx is |offset (|
|00006080| 77 65 20 6f 6e 6c 79 20 | 6e 65 65 64 20 31 36 20 |we only |need 16 |
|00006090| 62 69 74 73 29 2e 0d 0d | 42 46 30 39 20 78 78 78 |bits)...|BF09 xxx|
|000060a0| 78 09 45 4c 53 45 20 2d | 20 62 72 61 6e 63 68 2e |x.ELSE -| branch.|
|000060b0| 20 20 78 78 78 78 20 69 | 73 20 69 6e 69 74 69 61 | xxxx i|s initia|
|000060c0| 6c 6c 79 20 74 68 65 20 | 6f 66 66 73 65 74 20 62 |lly the |offset b|
|000060d0| 61 63 6b 20 74 6f 20 74 | 68 65 0d 20 20 09 09 09 |ack to t|he. ...|
|000060e0| 09 6f 72 69 67 69 6e 61 | 6c 20 63 6f 6e 64 69 74 |.origina|l condit|
|000060f0| 69 6f 6e 61 6c 20 62 72 | 61 6e 63 68 2c 20 69 6e |ional br|anch, in|
|00006100| 20 63 61 73 65 20 77 65 | 20 64 65 6c 65 74 65 20 | case we| delete |
|00006110| 74 68 69 73 20 62 72 61 | 6e 63 68 0d 20 20 09 09 |this bra|nch. ..|
|00006120| 09 09 61 6e 64 20 6e 65 | 65 64 20 74 6f 20 61 64 |..and ne|ed to ad|
|00006130| 6a 75 73 74 2e 20 20 4f | 6e 63 65 20 74 68 65 20 |just. O|nce the |
|00006140| 62 72 61 6e 63 68 20 69 | 73 20 72 65 73 6f 6c 76 |branch i|s resolv|
|00006150| 65 64 2c 20 61 6e 64 20 | 77 65 0d 20 20 09 09 09 |ed, and |we. ...|
|00006160| 09 6b 6e 6f 77 20 69 74 | 20 77 6f 6e 27 74 20 62 |.know it| won't b|
|00006170| 65 20 64 65 6c 65 74 65 | 64 2c 20 78 78 78 78 20 |e delete|d, xxxx |
|00006180| 62 65 63 6f 6d 65 73 20 | 74 68 65 20 62 72 61 6e |becomes |the bran|
|00006190| 63 68 20 6f 66 66 73 65 | 74 0d 20 20 09 09 09 09 |ch offse|t. ....|
|000061a0| 61 73 20 66 6f 72 20 6f | 74 68 65 72 20 75 6e 63 |as for o|ther unc|
|000061b0| 6f 6e 64 69 74 69 6f 6e | 61 6c 20 62 72 61 6e 63 |ondition|al branc|
|000061c0| 68 65 73 2e 20 20 57 65 | 20 63 61 6e 20 74 65 6c |hes. We| can tel|
|000061d0| 6c 20 77 68 69 63 68 0d | 20 20 09 09 09 09 69 73 |l which.| ....is|
|000061e0| 20 77 68 69 63 68 2c 20 | 73 69 6e 63 65 20 74 68 | which, |since th|
|000061f0| 65 20 66 69 72 73 74 20 | 6f 66 66 73 65 74 20 69 |e first |offset i|
|00006200| 73 20 6e 65 67 61 74 69 | 76 65 20 61 6e 64 20 74 |s negati|ve and t|
|00006210| 68 65 0d 20 20 09 09 09 | 09 73 65 63 6f 6e 64 20 |he. ...|.second |
|00006220| 70 6f 73 69 74 69 76 65 | 2e 0d 0d 42 46 30 41 09 |positive|...BF0A.|
|00006230| 09 72 65 70 6c 61 63 65 | 20 77 69 74 68 20 61 20 |.replace| with a |
|00006240| 6c 69 74 65 72 61 6c 20 | 6c 6f 61 64 20 69 6e 74 |literal |load int|
|00006250| 6f 20 72 30 20 6f 66 20 | 74 68 65 20 64 69 73 74 |o r0 of |the dist|
|00006260| 61 6e 63 65 20 74 68 65 | 20 63 6f 64 65 0d 20 20 |ance the| code. |
|00006270| 09 09 09 09 69 73 20 6d | 6f 76 65 64 2e 20 20 55 |....is m|oved. U|
|00006280| 73 65 64 20 69 6e 20 67 | 65 6e 65 72 61 74 69 6e |sed in g|eneratin|
|00006290| 67 20 74 68 65 20 61 64 | 64 72 20 6f 66 20 61 20 |g the ad|dr of a |
|000062a0| 6c 6f 63 61 74 69 6f 6e | 20 0d 20 20 09 09 09 09 |location| . ....|
|000062b0| 77 69 74 68 69 6e 20 74 | 68 65 20 63 75 72 72 65 |within t|he curre|
|000062c0| 6e 74 20 64 65 66 69 6e | 69 74 69 6f 6e 20 28 73 |nt defin|ition (s|
|000062d0| 69 6e 63 65 20 77 65 20 | 64 6f 6e 27 74 20 6b 6e |ince we |don't kn|
|000062e0| 6f 77 20 75 6e 74 69 6c | 0d 20 20 09 09 09 09 74 |ow until|. ....t|
|000062f0| 68 65 20 65 6e 64 20 68 | 6f 77 20 66 61 72 20 69 |he end h|ow far i|
|00006300| 74 20 6d 69 67 68 74 20 | 62 65 20 6d 6f 76 65 64 |t might |be moved|
|00006310| 29 2e 0d 0d 0d 0d 09 09 | 3d 3d 3d 3d 3d 3d 3d 3d |).......|========|
|00006320| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 20 45 58 54 |========|==== EXT|
|00006330| 45 52 4e 41 4c 20 43 41 | 4c 4c 53 20 3d 3d 3d 3d |ERNAL CA|LLS ====|
|00006340| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00006350| 3d 3d 0d 0d 0d 43 41 4c | 4c 5f 45 58 54 45 52 4e |==...CAL|L_EXTERN|
|00006360| 20 68 61 6e 64 6c 65 73 | 20 61 6e 20 65 78 74 65 | handles| an exte|
|00006370| 72 6e 61 6c 20 63 61 6c | 6c 2e 20 20 54 68 69 73 |rnal cal|l. This|
|00006380| 20 72 65 71 75 69 72 65 | 73 20 74 68 61 74 20 77 | require|s that w|
|00006390| 65 20 73 65 74 20 74 68 | 69 6e 67 73 20 75 70 20 |e set th|ings up |
|000063a0| 61 73 0d 09 74 68 65 20 | 50 6f 77 65 72 50 43 20 |as..the |PowerPC |
|000063b0| 76 6f 6c 75 6d 65 20 6f | 66 20 49 4d 20 73 61 79 |volume o|f IM say|
|000063c0| 73 3a 0d 0d 31 2e 09 57 | 65 20 68 61 76 65 20 61 |s:..1..W|e have a|
|000063d0| 20 70 6f 69 6e 74 65 72 | 20 77 68 69 63 68 20 69 | pointer| which i|
|000063e0| 73 20 72 65 73 6f 6c 76 | 65 64 20 62 79 20 74 68 |s resolv|ed by th|
|000063f0| 65 20 43 46 4d 20 2d 20 | 74 68 69 73 20 77 69 6c |e CFM - |this wil|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.